[jQuery] Re: Superfish feature request
Hi Jesse, I have been working on separating out the code you provided into it's own plugin (kind of sillily named Supposition, I really hate the name now so please feel free to suggest something better) so that it can be optionally added to a Superfish menu if the user desires, leaving the original code more or less untouched (and easier for me to maintain). I also resolved a few other issues such as a so-so workaround for the text jog issue, etc. and I also found that $(window).height() wasn't working on pages with more content than you had on your demo page, so I added in a snippet from the Dimensions plugin to get a correct viewport value. The main issue now (in addition to the z-index issues) is that the offset value for the vertical position of the submenus does not take into account the scroll position of the document. You can see on my main demo page that the menu appears way down the page, so when you hover the menu the submenus appear way up the page, usually outside the viewport completely unless you have the browser window maximised and are running a high screen resolution. I'm hoping that you understand how to fix this as I am lost when it comes to this type of stuff. Below is a link to my demo page with an extensive rant/explanation of where we are currently at with this idea. At the bottom of that page there is also a link to a zip file containing all the files for my demo so you can have an experiment yourself if you feel up to it. Any and all feedback is gladly received. http://users.tpg.com.au/j_birch/plugins/superfish/supposition-test/ Cheers Joel Birch.
[jQuery] Attempts failing to cause div to slide up, slide down
Hi, all. I've made several attempts to figure out how to cause a div to slide up and slide down when a menu item is moused-over but so far, all attempts have failed. I can get the div to hide upon initialization of the page, but the slide is non-responsive. My jQuery has been tried like this: $(document).ready(function() { $('div.image-wrapper').find('div.menu-details').hide().end().find('a').mouseover(function() { var answer = $('div.menu-details'); if (answer.is(':visible')) { answer.slideUp(); } else { answer.slideDown(); } }); }); and like this: $(document).ready(function() { $('div.image-wrapper').find('div.menu-details').hide().end().find('a').mouseover(function() { toggle('div.menu-details'); }); }); but neither variation has worked. The menu is a routine ullia href=. construct. Anyone see any errors and perhaps have another way to go about this? I'm trying at this point just to get a single, blank div to respond to the jQuery, however, eventually, the content in the div will be based upon the menu item moused-over. The url to view my attempts is http://c21ar.wsm-dev.com. The goal is to make something with HTML and jQuery which emulates the functionality for the to menu at this site: http://www.AtlantaFalcons.com Thanks for any assistance and thoughts! Rick
[jQuery] Re: Going thrue all form elements
Use $(':input').each(...) On Jan 12, 6:10 pm, Abdul-Rahman [EMAIL PROTECTED] wrote: Hey guys, I am trying to use the plugin ofhttp://fluidproject.org/blog/2008/01/11/jquery-tabindex-plugin/ to set the tabindexes for my form. I am going through it by querying it as following but it gives me back inputs, then the textareas, en then the selects (and I would like the elements based on the occurrence in stead as a collection of inputs, and then textareas, and then selects. This is the code I am using $(form input, form textarea, form select).each(function(i){ $(this).tabindex(i+1); }); does someone have a other solution?
[jQuery] Re: Attempts failing to cause div to slide up, slide down
Hey Rick, It looks like you're trying to bind the mouseover to links inside div.image-wrapper, but when I looked at your DOM, I didn't see any links there. That's probably why it's not working for you. ;-) --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Jan 13, 2008, at 8:55 AM, Rick Faircloth wrote: Hi, all. I've made several attempts to figure out how to cause a div to slide up and slide down when a menu item is moused-over but so far, all attempts have failed. I can get the div to hide upon initialization of the page, but the slide is non-responsive. My jQuery has been tried like this: $(document).ready(function() { $('div.image-wrapper').find('div.menu- details').hide().end().find('a').mouseover(function() { var answer = $('div.menu-details'); if (answer.is(':visible')) { answer.slideUp(); } else { answer.slideDown(); } }); }); and like this: $(document).ready(function() { $('div.image-wrapper').find('div.menu- details').hide().end().find('a').mouseover(function() { toggle('div.menu-details'); }); }); but neither variation has worked. The menu is a routine ullia href=. construct. Anyone see any errors and perhaps have another way to go about this? I'm trying at this point just to get a single, blank div to respond to the jQuery, however, eventually, the content in the div will be based upon the menu item moused-over. The url to view my attempts is http://c21ar.wsm-dev.com. The goal is to make something with HTML and jQuery which emulates the functionality for the to menu at this site: http://www.AtlantaFalcons.com Thanks for any assistance and thoughts! Rick
[jQuery] Re: jQuery.browser.version doesn't recognise IE7 anymore
... and another thing: The version of Firefox is not correctly returned either (have no problems in this regard with IE). I'm currently using Firefox ver.: 2.0.0.11 and jQuery retrieves ver.: 1.8.1.11. Fred NetHawk wrote: Don't know, if this has been observed by anybody else. Just wanted to let everybody know, that jQuery.browser.version returns 6 as version in IE7. -- View this message in context: http://www.nabble.com/jQuery.browser.version-doesn%27t-recognise-IE7-anymore-tp14781664s27240p14787955.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Countdown - my first plugin
Maybe consider a visual display similar to this: http://commadot.com/jquery/slotMachineEffect.php So that the numbers that countdown don't just blink, they animate. Glen On Jan 12, 2008 3:59 AM, Feijó [EMAIL PROTECTED] wrote: Check it out! http://plugins.jquery.com/project/countdown Still has some improvment to do I would love some suggestions, tips, changes, even in the comments on the code lol Didnt made the help nor demo yet, will probably this weekend This component countdown a value in seconds, i.e. 200 will show 03:20 and decrease it every second (or configurabled with another inverval). Naturaly can work with several different values in the same page, thats why I created that. that configurability is not working properly, who has time to look at it, please tell me how to improve regards Feijó
[jQuery] Re: preventing open element from being closed and reopened in accordion menu (not using accordion plugin)
Was just reading another post Trying to show a div on mouseover of menu item... and pointed me to the solution The answer: if ($(this).parent().next().is(':hidden')) On Jan 13, 11:03 am, Brad Hile [EMAIL PROTECTED] wrote: Hi I have a simple accordion menu and would like to prevent the already open dd from being closed and reopened when clicked on. eg. $(#menu dt a).click(function(){ // only activate if dd is hidden so currently active block is not reopened if(hidden???) { $(#menu dd:visible).slideUp(slow); } $(this).parent().next().slideDown(slow).addClass(open); return false; }); Can anyone suggest how to test the state of the current element I'm guessing $(this).parent().next().something? but don't know how to get its current state thanks Brad
[jQuery] how do I select distinct divs within a class
heres the deal, I've got some jq that looks for any a with a class of .rollover , and its replacing the images of ALL of the images with a surroudning a with a class of .rollover. Any ideas? script type=text/javascript $(document).ready(function(){ $(.menuImage).hover( function() { curr = $(this).find(img).attr(src); overlen = curr.length; over = curr.substr(0, overlen-12); over = over+'_over.gif'; $(this).find(img).attr({ src: over}); }, function() { $(this).find(img).attr({ src: curr}); } ) $(.menuImage).find(img).each(function(i) { temp = this.src; prelen = temp.length; pre = temp.substr(0, prelen-12); pre = pre+'_over.gif'; preload_image_object = new Image(); preload_image_object.src = pre; }); }); /script
[jQuery] Re: Pretty XML?
It sounds like what you really want is to use an xml stylesheet. I'm not sure what the best way to do that with jQuery is. There may be some way to do it natively, also a quick search brought up this plugin: http://www.jongma.org/webtools/jquery/xslt/ An explanation of xlst: http://www-128.ibm.com/developerworks/xml/library/x-xdpshpul.html?openl=976,t=gr#code5 If you know the structure of the xml, another workaround could also be to style the xml directly with css. You could display: block on all the elements, then position them to get the tabbed effect. Then use the pseudo class :before {content: tagname} and :after {content: / tagname} to get the tags in there. I'd be interested to hear how you end up doing it. Colin On Jan 10, 6:57 am, bweaverusenet [EMAIL PROTECTED] wrote: Thanks, George. You know, anymore when I'm doing javascript I just have jQuery on the brain, so naturally I posted what's mostly a general javascript question to a jQuery group. Well, actually, I was hoping to find some elegant jQuery voodoo or perhaps a plugin that does this before reverting to something more rudimentary or rolling my own. ;-) Thanks again. On Jan 10, 8:17 am, George [EMAIL PROTECTED] wrote: I'm not aware of any existing solution so I'd probably consider using regular expressions to add line feeds and tabs between elements. It will help alot if you can assume the xml will be well formed. Given the nature of this forum you might also consider a jQuery solution that iterates (recursively?) through the tree to copy element names and attributes as xml to a text string. George On Jan 9, 8:35 pm, bweaverusenet [EMAIL PROTECTED] wrote: Any ideas? Thanks! -bill
[jQuery] Re: jQuery.browser.version doesn't recognise IE7 anymore
I can confirm that this is the case, on a WindowsXP machine with IE7 installed, I have the same userAgent string, so get the same result. There is no problem with my Windows Vista IE7 because the userAgent string is different. NetHawk wrote: Don't know, if this has been observed by anybody else. Just wanted to let everybody know, that jQuery.browser.version returns 6 as version in IE7. This might have to do with a changed appVersion or user agent string. Mine are (in IE7): userAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30) See the MSIE 6.0 in both strings. -- View this message in context: http://www.nabble.com/jQuery.browser.version-doesn%27t-recognise-IE7-anymore-tp14781664s27240p14784306.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] submit via link and redirect dynamically
hi, i'm developing a little site, where the user has the possibility to fill in several forms. i want that the user can navigate through those forms via normal html links. on click the form should be submitted and on success the content in div #xy be updated in relation to the link. i tried it like this, but this is not working. has anybody a workaroung or else? thank you anti my try: $(document).ready(function(){ var options = { beforeSubmit: showRequest, success: showResponse, url: 'inc/application.adv.func.php' }; function showRequest(formData, jqForm, options) { $(body).addClass(curWait); var queryString = $.param(formData); return true; } function showResponse(responseText, statusText) { $(body).addClass(curAuto); jQuery('div#adv_content').load('inc/de.application.adv.inc.php? page='+pageNumber); } $('#step1').click(function(){ var pageNumber = '0'; $('#myform').ajaxSubmit(options); return false; }); // etc. etc. $('#step5').click(function(){ var pageNumber = '4'; $('#myform').ajaxSubmit(options); return false; }); });
[jQuery] Re: jQuery API extension for Dreamweaver
Glad everyone is diggin' the jQuery API extension for Dreamweaver. I added a demo video on the main page of the website: http://xtnd.us New beta would be out before Jan. is over. I am hoping to release it before end of Jan., but we're taking some time to go through and make sure the icons look dope for everyone - and that they make sense. Also, minor issue with code coloring at the moment.
[jQuery] Load external content
Hi there, I'm pretty new to jQuery, and i seem to be unable to find what i need. I have a (php-based) file-manager. What i need is when people browse folders, to replace the current folder with the chosen one. Imagine my dir looks somewhat like this: div id=contents /images dir /illustrations dir /file.jpg jpg /div What i need is when someone clicks /images that the content of #contents is replaced with the new info (called from PHP). I ended up with Hijax (because i like the maintained history), but i'm unable to fire the events from a link that is called from an external page. I hope this sounds as if it makes sense. Thanks in advance! Frizzle.
[jQuery] Re: How to remove duplicates from dropdown select box
Hello Artzone, It's my first reply , I'm so excited . I try this with you example and it work . You could change #mylist with and other 'id' it will work also. It work with a 'id' , but with a 'class' you have to change the code. $(document).ready( function(){ var a = new Array(); $(#mylist).children(option).each(function(x){ test = false; b = a[x] = $(this).val(); for (i=0;ia.length-1;i++){ if (b ==a[i]) test =true; } if (test) $(this).remove(); }) }); Have a nice day ...
[jQuery] Jquery fix for IE6 position:fixed bug ?
Hi, I am trying to create a shopping cart similar to the one on http://www.panic.com/goods/ I have tried their technique to get the cart fixed at the bottom of the screen in IE6 but there are several problems with it (first off my body tag background isn't scrolling! Then the heights get a bit messed up). I like the fact that their solution doesn't use setTimeout as that can produce jerkiness and was wondering if anybody had found a simple solution to this using any jQuery cleverness ?
[jQuery] Re: Inserting element into jQuery object
Hi Josh, don't try to reinvent the wheel here. Just use the jQuery a href=http://docs.jquery.com/Traversing/add#expr;.add()/a method. :) var $divs = $('div.first,div.second'); ... $divs = $divs.add('div.third'); -- Bohdan Ganicky On Jan 10, 8:32 pm, Josh Nathanson [EMAIL PROTECTED] wrote: I'm having a devil of a time doing something that would seem to be pretty basic. I have a jQuery object with two elements, and I want to insert a new element in between them - not altering the DOM, but just the jQuery object. So if my original jQuery object looks like this when logged in the console: [ div1, div2 ] I want it ultimately to look like this, inserting newdiv manually: [ div1, newdiv, div2 ] ? -- Josh
[jQuery] Re: Can you please check why it's not working?
Oh! I've got it..Thank you, anyway, I've got another thing that I don't know how to do it. I want to create something that works like a tab. See my code below script type=text/javascript $(function() { $(#text2_message).clone().removeClass().appendTo($(#message)); $(span.text1).click(function() { $(#message).empty().html($(#text1_message).clone().fadeIn(normal)); return false; }); $(span.text2).click(function() { $(#message).empty().html($(#text2_message).clone().fadeIn(normal)); return false; }); }); /script # Text 1 | # Text 2 div id=message/div div id=text2_message class=hidden .//Some messages /div div id=text1_message class=hidden .//Some messages /div See, this one works fine, after clicking it will empty out and the new one fades in, but what I want is for the appearing one to be faded out first, then the newly clicked one appears afterwards. How can I do it? Thank you very much again, this is a very useful forum DeaR PS. If there are some other ways that work in the way that I want and better than mine, please do suggest me...Thank you Michael Geary wrote: Oops, I missed one in the disappear function, which should read: function disappear() { $(#response).fadeOut(slow); } The code with proper semicolons would read: function disappear() { $(#response).fadeOut(slow) } $(document).ready(function() { $(#message_me).click(function() { $(#form).fadeIn(slow); }); $(#send).click(function() { var str = $(#input_form).serialize(); $.post(send-mail.php,str,function(data) { $(#response).html(data).fadeTo(slow, 0.7); setTimeout(disappear(), 3000); }); }); $.get(counter.php, function(data) { $(#counter).html(data).fadeIn(slow); }); }); -- View this message in context: http://www.nabble.com/Can-you-please-check-why-it%27s-not-working--tp14773622s27240p14784315.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Going thrue all form elements
But that would skip all the textarea/select fields... On Jan 13, 3:14 pm, Scott González [EMAIL PROTECTED] wrote: Use $(':input').each(...) On Jan 12, 6:10 pm, Abdul-Rahman [EMAIL PROTECTED] wrote: Hey guys, I am trying to use the plugin ofhttp://fluidproject.org/blog/2008/01/11/jquery-tabindex-plugin/ to set the tabindexes for my form. I am going through it by querying it as following but it gives me back inputs, then the textareas, en then the selects (and I would like the elements based on the occurrence in stead as a collection of inputs, and then textareas, and then selects. This is the code I am using $(form input, form textarea, form select).each(function(i){ $(this).tabindex(i+1); }); does someone have a other solution?
[jQuery] Problem With jquery form plugin and tinymce
I have a form which is submitted through jquery form plugin. The form contains only one textarea which uses tinymce. The problem is that when I try to submit the form, the new content of the textarea is not sent through POST. If there is any content before that modifications, than that content is send. If I submit the form twice, than the second time, the new content is send. Here is some code: script type=text/javascript src=include/js/jquery-1.2.1.min.js/script script type=text/javascript src=include/js/form.js/script script type=text/javascript src=include/js/tiny_mce/tiny_mce.js/script script type=text/javascript tinyMCE.init({ mode : textareas, theme : advanced, theme_advanced_buttons1 : bold,italic,underline,separator,strikethrough,justifyleft,justifycenter,justifyright, justifyfull,bullist,numlist,undo,redo,link,unlink, theme_advanced_buttons2 : , theme_advanced_buttons3 : , theme_advanced_toolbar_location : top, theme_advanced_toolbar_align : left, theme_advanced_statusbar_location : bottom }); $(document).ready(function(){ $('#home').ajaxForm({ dataType: 'json', success: function(data){ if (data.empty != ) alert (data.empty); if (data.mysql != ) alert (data.mysql); if (data.ok == ok) alert (All ok!); } }); }); /script -- View this message in context: http://www.nabble.com/Problem-With-jquery-form-plugin-and-tinymce-tp14788650s27240p14788650.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] jScrollPane Not Scrolling All The Way After Re-Skinning
I'm using jScrollPane pretty much out of the box with the following changes: I put the scripts into assets/scripts, the css into assets/css, and the images into assets/images. Any urls have been changed to reflect this. I created three jpgs for the up arrow, down arrow (10 x 9 px) and the drag grab center (10 x 10 px) The problem I am having is that the content doesn't scroll down enough to display all the content of the div. In the sample div, it's the anchor a the bottom that's not showing up. Here's the call: -- $('.scrollPane').jScrollPane({showArrows:true, scrollbarWidth: 10}); -- Here's a sample div: -- div class=scrollPane h2NEWS/h2 pBrulant S.W.A.T (Strategic Web and Technology) Event/p a href=#View All News/a /div -- and here is the pertinent css: -- .jScrollPaneDrag { position: absolute; height: 10px; background: url(../images/drag_grab.jpg) no-repeat 0 0; cursor: pointer; overflow: hidden; } a.jScrollArrowUp { display: block; position: absolute; z-index: 1; top: 0; right: 0; text-indent: -2000px; overflow: hidden; /*background-color: #666;*/ height: 9px; background: url(../images/up_arrow.jpg) no-repeat 0 0; } a.jScrollArrowDown { display: block; position: absolute; z-index: 1; bottom: 0; right: 0; text-indent: -2000px; overflow: hidden; /*background-color: #666;*/ height: 9px; background: url(../images/down_arrow.jpg) no-repeat 0 0; } .scrollPane { width: 175px; overflow: auto; height: 50px; margin:10px 0 15px 0; } .scrollPane a:link, .scrollPane a:hover, .scrollPane a:visited, #centerRightCol a:link, #centerRightCol a:hover, #centerRightCol a:visited{ color:#b7c71c; height:7px; padding-right: 10px; background-image:url(../images/right_arrow.jpg); background-repeat:no-repeat; background-position:right; } --
[jQuery] Re: Going thrue all form elements
Oeps, Sorry, Works! thnx On Jan 13, 3:14 pm, Scott González [EMAIL PROTECTED] wrote: Use $(':input').each(...) On Jan 12, 6:10 pm, Abdul-Rahman [EMAIL PROTECTED] wrote: Hey guys, I am trying to use the plugin ofhttp://fluidproject.org/blog/2008/01/11/jquery-tabindex-plugin/ to set the tabindexes for my form. I am going through it by querying it as following but it gives me back inputs, then the textareas, en then the selects (and I would like the elements based on the occurrence in stead as a collection of inputs, and then textareas, and then selects. This is the code I am using $(form input, form textarea, form select).each(function(i){ $(this).tabindex(i+1); }); does someone have a other solution?
[jQuery] Re: Attempts failing to cause div to slide up, slide down
Well, let's take a look on your jQuery code: $(document).ready(function() { $('div.image-wrapper').find('div.menu-details').hide() // well, this works fine, even if I don't get why you use class instead of id to locate the menu-details (you have the id=menu-details in the markup as well) .end().find('a').mouseover(function() { // now you're looking for as inside div.image-wrapper and there just are no as in the markup, therefore nothing happens at all ... ... }); }); ...what as are you looking for? Maybe just tell us in your own words and we'll translate that to jQuery for you. -- Bohdan Ganicky On Jan 13, 2:55 pm, Rick Faircloth [EMAIL PROTECTED] wrote: Hi, all. I've made several attempts to figure out how to cause a div to slide up and slide down when a menu item is moused-over but so far, all attempts have failed. I can get the div to hide upon initialization of the page, but the slide is non-responsive. My jQuery has been tried like this: $(document).ready(function() { $('div.image-wrapper').find('div.menu-details').hide().end().find('a').mouseover(function() { var answer = $('div.menu-details'); if (answer.is(':visible')) { answer.slideUp(); } else { answer.slideDown(); } }); }); and like this: $(document).ready(function() { $('div.image-wrapper').find('div.menu-details').hide().end().find('a').mouseover(function() { toggle('div.menu-details'); }); }); but neither variation has worked. The menu is a routine ullia href=. construct. Anyone see any errors and perhaps have another way to go about this? I'm trying at this point just to get a single, blank div to respond to the jQuery, however, eventually, the content in the div will be based upon the menu item moused-over. The url to view my attempts ishttp://c21ar.wsm-dev.com. The goal is to make something with HTML and jQuery which emulates the functionality for the to menu at this site: http://www.AtlantaFalcons.com Thanks for any assistance and thoughts! Rick
[jQuery] Re: Attempts failing to cause div to slide up, slide down
Hi, Karl.. thanks for the reply. Sigh... I guess it painfully obvious that I just haven't gotten this chaining thing down. I can't quite figure out what pertains to what. But even *I* should have caught the fact that the a selectors weren't in any of the referenced div's... duh. Now, I've got this: $(document).ready(function() { $('div.image-wrapper').find('div.menu-details').hide(); $('div.menu').find('a').mouseover(function() { var answer = $('div.menu-details'); if (answer.is(':visible')) { answer.slideUp(); } else { answer.slideDown(); } }); }); I added a new first line of the function to initially hide the 'menu-details' div. Works fine. However, my mouseover function is a little dysfunctional, to put it mildly. The first time I mouse over a menu item the div slides in... yay! However, the next menu item I mouseover causes the div to slideup. That makes sense according to the code above. How would I add a mouseout function to cause the div to slideup when I mouseout from the menu item? Should be code have an added mouseout function or additional if clauses? Thanks for the help! -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Karl Swedberg Sent: Sunday, January 13, 2008 10:21 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Attempts failing to cause div to slide up, slide down Hey Rick, It looks like you're trying to bind the mouseover to links inside div.image-wrapper, but when I looked at your DOM, I didn't see any links there. That's probably why it's not working for you. ;-) --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Jan 13, 2008, at 8:55 AM, Rick Faircloth wrote: Hi, all. I've made several attempts to figure out how to cause a div to slide up and slide down when a menu item is moused-over but so far, all attempts have failed. I can get the div to hide upon initialization of the page, but the slide is non-responsive. My jQuery has been tried like this: $(document).ready(function() { $('div.image-wrapper').find('div.menu- details').hide().end().find('a').mouseover(function() { var answer = $('div.menu-details'); if (answer.is(':visible')) { answer.slideUp(); } else { answer.slideDown(); } }); }); and like this: $(document).ready(function() { $('div.image-wrapper').find('div.menu- details').hide().end().find('a').mouseover(function() { toggle('div.menu-details'); }); }); but neither variation has worked. The menu is a routine ullia href=. construct. Anyone see any errors and perhaps have another way to go about this? I'm trying at this point just to get a single, blank div to respond to the jQuery, however, eventually, the content in the div will be based upon the menu item moused-over. The url to view my attempts is http://c21ar.wsm-dev.com. The goal is to make something with HTML and jQuery which emulates the functionality for the to menu at this site: http://www.AtlantaFalcons.com Thanks for any assistance and thoughts! Rick
[jQuery] Re: Going thrue all form elements
But that would skip all the textarea/select fields... No it won't. It will even include button elements. :input is a jQuery selection expression that finds all form controls. Mike
[jQuery] Re: Attempts failing to cause div to slide up, slide down
Hi, Besh... and thanks for the reply. I realized my mistakes with the targeting of the 'a' selectors after Karl replied. sheepish grin My reply to Karl should show where I need some help next. It should be up anytime. Thanks! Rick -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of besh Sent: Sunday, January 13, 2008 9:22 AM To: jQuery (English) Subject: [jQuery] Re: Attempts failing to cause div to slide up, slide down Well, let's take a look on your jQuery code: $(document).ready(function() { $('div.image-wrapper').find('div.menu-details').hide() // well, this works fine, even if I don't get why you use class instead of id to locate the menu-details (you have the id=menu-details in the markup as well) .end().find('a').mouseover(function() { // now you're looking for as inside div.image-wrapper and there just are no as in the markup, therefore nothing happens at all ... ... }); }); ...what as are you looking for? Maybe just tell us in your own words and we'll translate that to jQuery for you. -- Bohdan Ganicky On Jan 13, 2:55 pm, Rick Faircloth [EMAIL PROTECTED] wrote: Hi, all. I've made several attempts to figure out how to cause a div to slide up and slide down when a menu item is moused-over but so far, all attempts have failed. I can get the div to hide upon initialization of the page, but the slide is non-responsive. My jQuery has been tried like this: $(document).ready(function() { $('div.image-wrapper').find('div.menu-details').hide().end().find('a').mouseover(function() { var answer = $('div.menu-details'); if (answer.is(':visible')) { answer.slideUp(); } else { answer.slideDown(); } }); }); and like this: $(document).ready(function() { $('div.image-wrapper').find('div.menu-details').hide().end().find('a').mouseover(function() { toggle('div.menu-details'); }); }); but neither variation has worked. The menu is a routine ullia href=. construct. Anyone see any errors and perhaps have another way to go about this? I'm trying at this point just to get a single, blank div to respond to the jQuery, however, eventually, the content in the div will be based upon the menu item moused-over. The url to view my attempts ishttp://c21ar.wsm-dev.com. The goal is to make something with HTML and jQuery which emulates the functionality for the to menu at this site: http://www.AtlantaFalcons.com Thanks for any assistance and thoughts! Rick
[jQuery] Re: Attempts failing to cause div to slide up, slide down
Something I didn't mention earlier is that I need for the visitor to be able to mouseover the menu item, have the 'menu-details' div slide down, then allow the visitor continue to mouseover the div content with the div sliding up... Rick -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rick Faircloth Sent: Sunday, January 13, 2008 3:55 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Attempts failing to cause div to slide up, slide down Hi, Besh... and thanks for the reply. I realized my mistakes with the targeting of the 'a' selectors after Karl replied. sheepish grin My reply to Karl should show where I need some help next. It should be up anytime. Thanks! Rick -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of besh Sent: Sunday, January 13, 2008 9:22 AM To: jQuery (English) Subject: [jQuery] Re: Attempts failing to cause div to slide up, slide down Well, let's take a look on your jQuery code: $(document).ready(function() { $('div.image-wrapper').find('div.menu-details').hide() // well, this works fine, even if I don't get why you use class instead of id to locate the menu-details (you have the id=menu-details in the markup as well) .end().find('a').mouseover(function() { // now you're looking for as inside div.image-wrapper and there just are no as in the markup, therefore nothing happens at all ... ... }); }); ...what as are you looking for? Maybe just tell us in your own words and we'll translate that to jQuery for you. -- Bohdan Ganicky On Jan 13, 2:55 pm, Rick Faircloth [EMAIL PROTECTED] wrote: Hi, all. I've made several attempts to figure out how to cause a div to slide up and slide down when a menu item is moused-over but so far, all attempts have failed. I can get the div to hide upon initialization of the page, but the slide is non-responsive. My jQuery has been tried like this: $(document).ready(function() { $('div.image-wrapper').find('div.menu- details').hide().end().find('a').mouseover(function() { var answer = $('div.menu-details'); if (answer.is(':visible')) { answer.slideUp(); } else { answer.slideDown(); } }); }); and like this: $(document).ready(function() { $('div.image-wrapper').find('div.menu- details').hide().end().find('a').mouseover(function() { toggle('div.menu-details'); }); }); but neither variation has worked. The menu is a routine ullia href=. construct. Anyone see any errors and perhaps have another way to go about this? I'm trying at this point just to get a single, blank div to respond to the jQuery, however, eventually, the content in the div will be based upon the menu item moused-over. The url to view my attempts ishttp://c21ar.wsm-dev.com. The goal is to make something with HTML and jQuery which emulates the functionality for the to menu at this site: http://www.AtlantaFalcons.com Thanks for any assistance and thoughts! Rick
[jQuery] Re: Problem With jquery form plugin and tinymce
I have a form which is submitted through jquery form plugin. The form contains only one textarea which uses tinymce. The problem is that when I try to submit the form, the new content of the textarea is not sent through POST. If there is any content before that modifications, than that content is send. If I submit the form twice, than the second time, the new content is send. The key is to invoke tinyMCE.triggerSave before the form plugin serializes the data. You can do this by binding to the form plugin's custom event 'form.pre.serialize' like this: $().bind('form.pre.serialize', function(event, $form, options) { tinyMCE.triggerSave(); }); Mike
[jQuery] Re: Inserting element into jQuery object
Hi Josh, don't try to reinvent the wheel here. Just use the jQuery a href=http://docs.jquery.com/Traversing/add#expr;.add()/a method: var $divs = $('div#first,div#second'); ... $divs = $divs.add('div#third'); -- Bohdan Ganicky On Jan 10, 8:32 pm, Josh Nathanson [EMAIL PROTECTED] wrote: I'm having a devil of a time doing something that would seem to be pretty basic. I have a jQueryobjectwith two elements, and I want to insert a new element in between them - not altering the DOM, but just the jQueryobject. So if my original jQueryobjectlooks like this when logged in the console: [ div1, div2 ] I want it ultimately to look like this, inserting newdiv manually: [ div1, newdiv, div2 ] ? -- Josh
[jQuery] Re: :not and :headers
Haven't tried it, but I think the issue is you're apply it to _everything_ (*) that is not a header. That means the body, all paragraphs, divs, spans etc. Ie, if you haven't specified a font for headers explicitly, the headers will inherit the font from the body (or a containing div, span, a etc). Might be better to apply the font to everything then just apply the old font to the headers: $('*').css(some css props here); $(':header').css(old css props); .. or something. On Jan 13, 7:50 am, Jon Atkinson [EMAIL PROTECTED] wrote: Hello, I'm trying to apply a font style to all elements on a page apart from headers. This is the code I'm using: $('*:not(:header)').css('font-family', '\'Trebuchet MS\', Arial, sans-serif'); This seems to apply the new CSS to all elements on the page. What am I doing wrong? Thanks. --Jon
[jQuery] Re: submit via link and redirect dynamically
I'm not an AJAX guru, but it looks like the pageNumber variable is local to each of your click functions and won't be seen by the showResponse function. Make it global (actually, local to the document.ready function): $(document).ready(function(){ var pageNumber; // local variable in this document.ready function ...other stuff.. function showResponse(responseText, statusText) { $(body).addClass(curAuto); $('div#adv_content').load('inc/de.application.adv.inc.php? page='+pageNumber); // showResponse doesn't have its own pageNumber variable, so it uses the enclosing function's one. This is called a closure. } $('#step1').click(function(){ pageNumber = '0'; // note: no 'var' ! So no local pageNumber variable, so it uses the enclosing function's one. The same one that showResponse will use later! A little bit of Javascript magic. $('#myform').ajaxSubmit(options); return false; }); On Jan 13, 2:47 am, antiheld2000 [EMAIL PROTECTED] wrote: hi, i'm developing a little site, where the user has the possibility to fill in several forms. i want that the user can navigate through those forms via normal html links. on click the form should be submitted and on success the content in div #xy be updated in relation to the link. i tried it like this, but this is not working. has anybody a workaroung or else? thank you anti my try: $(document).ready(function(){ var options = { beforeSubmit: showRequest, success: showResponse, url: 'inc/application.adv.func.php' }; function showRequest(formData, jqForm, options) { $(body).addClass(curWait); var queryString = $.param(formData); return true; } function showResponse(responseText, statusText) { $(body).addClass(curAuto); jQuery('div#adv_content').load('inc/de.application.adv.inc.php? page='+pageNumber); } $('#step1').click(function(){ var pageNumber = '0'; $('#myform').ajaxSubmit(options); return false; }); // etc. etc. $('#step5').click(function(){ var pageNumber = '4'; $('#myform').ajaxSubmit(options); return false; }); })
[jQuery] Re: Attempts failing to cause div to slide up, slide down
Hey Rick, Sounds like you want to use the .hover() method. It takes two arguments -- one for mouseover and one for mouseout: .hover(function() { // Stuff to do when the mouse enters the element; }, function() { // Stuff to do when the mouse leaves the element; }); --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Jan 13, 2008, at 3:40 PM, Rick Faircloth wrote: Hi, Karl.. thanks for the reply. Sigh... I guess it painfully obvious that I just haven't gotten this chaining thing down. I can't quite figure out what pertains to what. But even *I* should have caught the fact that the a selectors weren't in any of the referenced div's... duh. Now, I've got this: $(document).ready(function() { $('div.image-wrapper').find('div.menu-details').hide(); $('div.menu').find('a').mouseover(function() { var answer = $('div.menu-details'); if (answer.is(':visible')) { answer.slideUp(); } else { answer.slideDown(); } }); }); I added a new first line of the function to initially hide the 'menu- details' div. Works fine. However, my mouseover function is a little dysfunctional, to put it mildly. The first time I mouse over a menu item the div slides in... yay! However, the next menu item I mouseover causes the div to slideup. That makes sense according to the code above. How would I add a mouseout function to cause the div to slideup when I mouseout from the menu item? Should be code have an added mouseout function or additional if clauses? Thanks for the help! -Original Message- From: jquery-en@googlegroups.com [mailto:jquery- [EMAIL PROTECTED] On Behalf Of Karl Swedberg Sent: Sunday, January 13, 2008 10:21 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Attempts failing to cause div to slide up, slide down Hey Rick, It looks like you're trying to bind the mouseover to links inside div.image-wrapper, but when I looked at your DOM, I didn't see any links there. That's probably why it's not working for you. ;-) --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Jan 13, 2008, at 8:55 AM, Rick Faircloth wrote: Hi, all. I've made several attempts to figure out how to cause a div to slide up and slide down when a menu item is moused-over but so far, all attempts have failed. I can get the div to hide upon initialization of the page, but the slide is non-responsive. My jQuery has been tried like this: $(document).ready(function() { $('div.image-wrapper').find('div.menu- details').hide().end().find('a').mouseover(function() { var answer = $('div.menu-details'); if (answer.is(':visible')) { answer.slideUp(); } else { answer.slideDown(); } }); }); and like this: $(document).ready(function() { $('div.image-wrapper').find('div.menu- details').hide().end().find('a').mouseover(function() { toggle('div.menu-details'); }); }); but neither variation has worked. The menu is a routine ullia href=. construct. Anyone see any errors and perhaps have another way to go about this? I'm trying at this point just to get a single, blank div to respond to the jQuery, however, eventually, the content in the div will be based upon the menu item moused-over. The url to view my attempts is http://c21ar.wsm-dev.com. The goal is to make something with HTML and jQuery which emulates the functionality for the to menu at this site: http://www.AtlantaFalcons.com Thanks for any assistance and thoughts! Rick
[jQuery] Re: Attempts failing to cause div to slide up, slide down
Hi Rick, You might want to attach one .hover() method to the UL instead of the LIs and have that one slide the other element down and up. Then, attach another .hover() to the LIs so that you can have different content displayed depending on which one is being hovered. --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Jan 13, 2008, at 6:10 PM, Rick Faircloth wrote: Thanks, Karl... that's working better. However, now, if I run the mouse over several menu items at once, the menu-detail div goes up and down quite a few times before it stops! It acts like it's wacko! :o) Do I need to work in the hoverIntent plug-in or is there some core function that will allow the hover to wait until the mouse settles on a menu item for a moment? Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery- [EMAIL PROTECTED] On Behalf Of Karl Swedberg Sent: Sunday, January 13, 2008 5:35 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Attempts failing to cause div to slide up, slide down Hey Rick, Sounds like you want to use the .hover() method. It takes two arguments -- one for mouseover and one for mouseout: .hover(function() { // Stuff to do when the mouse enters the element; }, function() { // Stuff to do when the mouse leaves the element; }); --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Jan 13, 2008, at 3:40 PM, Rick Faircloth wrote: Hi, Karl.. thanks for the reply. Sigh... I guess it painfully obvious that I just haven't gotten this chaining thing down. I can't quite figure out what pertains to what. But even *I* should have caught the fact that the a selectors weren't in any of the referenced div's... duh. Now, I've got this: $(document).ready(function() { $('div.image-wrapper').find('div.menu-details').hide(); $('div.menu').find('a').mouseover(function() { var answer = $('div.menu-details'); if (answer.is(':visible')) { answer.slideUp(); } else { answer.slideDown(); } }); }); I added a new first line of the function to initially hide the 'menu- details' div. Works fine. However, my mouseover function is a little dysfunctional, to put it mildly. The first time I mouse over a menu item the div slides in... yay! However, the next menu item I mouseover causes the div to slideup. That makes sense according to the code above. How would I add a mouseout function to cause the div to slideup when I mouseout from the menu item? Should be code have an added mouseout function or additional if clauses? Thanks for the help! -Original Message- From: jquery-en@googlegroups.com [mailto:jquery- [EMAIL PROTECTED] On Behalf Of Karl Swedberg Sent: Sunday, January 13, 2008 10:21 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Attempts failing to cause div to slide up, slide down Hey Rick, It looks like you're trying to bind the mouseover to links inside div.image-wrapper, but when I looked at your DOM, I didn't see any links there. That's probably why it's not working for you. ;-) --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Jan 13, 2008, at 8:55 AM, Rick Faircloth wrote: Hi, all. I've made several attempts to figure out how to cause a div to slide up and slide down when a menu item is moused-over but so far, all attempts have failed. I can get the div to hide upon initialization of the page, but the slide is non-responsive. My jQuery has been tried like this: $(document).ready(function() { $('div.image-wrapper').find('div.menu- details').hide().end().find('a').mouseover(function() { var answer = $('div.menu-details'); if (answer.is(':visible')) { answer.slideUp(); } else { answer.slideDown(); } }); }); and like this: $(document).ready(function() { $('div.image-wrapper').find('div.menu- details').hide().end().find('a').mouseover(function() { toggle('div.menu-details'); }); }); but neither variation has worked. The menu is a routine ullia href=. construct. Anyone see any errors and perhaps have another way to go about this? I'm trying at this point just to get a single, blank div to respond to the jQuery, however, eventually, the content in the div will be based upon the menu item moused-over. The url to view my attempts is http://c21ar.wsm-dev.com. The goal is to make something with
[jQuery] Announce: jQuery Expander Plugin
Hey everyone, Last week I wrote a blog entry about how to hide a portion of an element's text and display a link that, when clicked on, reveals the hidden portion. http://www.learningjquery.com/2008/01/revealing-details-with-jquery Well, I decided to convert the script into a little plugin called Expander. It's kind of rough, but I'd love some feedback if anyone is interested in taking a look. I'll probably write up another blog entry that shows what I did, but I thought I'd share it with the list first: http://plugins.learningjquery.com/expander/ thanks, --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com
[jQuery] Re: Attempts failing to cause div to slide up, slide down
Thanks for the tip, Karl. This little drop-down menu-detail div project is turning out to be quite more than I expected. Quite complicated. You've moved to the next step I was going to have to figure out, which is how to have various content for each menu item. I could use ajax or ColdFusion. I will probably choose ColdFusion, at least at first and use cfincludes to pull in the content, since I know ColdFusion programming, but have never done anything with ajax. I'll take a look at your approach and see what I can figure out. Rick -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Karl Swedberg Sent: Sunday, January 13, 2008 6:47 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Attempts failing to cause div to slide up, slide down Hi Rick, You might want to attach one .hover() method to the UL instead of the LIs and have that one slide the other element down and up. Then, attach another .hover() to the LIs so that you can have different content displayed depending on which one is being hovered. --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com
[jQuery] a way to convert jquery object to text for dom injection
i need to insert a clone of one dom object i do var hex = $(#d).clone(); $(div).append(text blab bla+hex+ok nana); and it's not working... how do i do this?
[jQuery] Re: Announce: jQuery Expander Plugin
Very nice Karl, as usual! It's similar in functionality to the http://www.reindel.com/truncate/ truncate plugin that I recently used, but feels more refined. How about making it easy to use an expand/collapse icon in place of the text? -- View this message in context: http://www.nabble.com/Announce%3A-jQuery-Expander-Plugin-tp14793146s27240p14795531.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.