[jQuery] Autocompleter update
Plugin: Autocompleter Url: http://www.dyve.net/jquery?autocomplete Docs: http://www.dyve.net/jquery/autocomplete.txt New options: The options below provide a better user experience (automatically picking results) and advanced markup options (the approach is a little different, but this could be used to duplicate the script.aculo.us demo with pictures in the results). selectFirst (default value: false) If this is set to true, the first autocomplete value will be automatically selected on tab/return, even if it has not been handpicked by keyboard or mouse action. If there is a handpicked (highlighted) result, that result will take precedence. selectOnly (default value: false) If this is set to true, and there is only one autocomplete when the user hits tab/return, it will be selected even if it has not been handpicked by keyboard or mouse action. This overrides selectFirst. formatItem (default value: none) A JavaScript funcion that can provide advanced markup for an item. For each row of results, this function will be called. The returned value will be displayed inside an LI element in the results list. See the source code of http://www.dyve.net/jquery?autocomplete for an example. None of this will break compatibility, you can just use the new js without any changes to your existing code. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Confused German User
sunsean wrote: http://praegnanz.de/weblog/elegantere-programmierung-der-blogtoys John, he's saying that $(.blogtoy h2).find(div).toggle(slow); does not work. He's a little confused with the Moo.fx toggle function or something like that, my german not awesome. At least I tried. =P Seems that your german is much better than my english ;) He expected that jQuery's toggle does the same than Moo.fx's toggle. He also mentioned that $(.blogtoy h2).find(div).toggle(); works, but $(.blogtoy h2).find(div).toggle(slow); has strange result. He submitted a bug: http://jquery.com/dev/bugs/bug/182/ I guess the comments there brought him to the right way. His latest comment ends width: jQuery rules! Jan -- View this message in context: http://www.nabble.com/Confused-German-User-tf2224106.html#a6165860 Sent from the JQuery forum at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Autocompleter update
Dylan Verheul wrote: Plugin: Autocompleter Url: http://www.dyve.net/jquery?autocomplete Docs: http://www.dyve.net/jquery/autocomplete.txt Well done, i'm sure i'm gonna use that soon. One note: In the source code at http://www.dyve.net/jquery?autocomplete, the line this.wrap(div class=' + options.wrapperClass + + options.removeClass + '/div); should be this.wrap(quot;lt;div class='quot; + options.wrapperClass + quot; quot; + options.removeClass + quot;'gt;lt;/divgt;quot;); to be shown corretly inside the pre. Cheers, Jan -- View this message in context: http://www.nabble.com/Autocompleter-update-tf2225088.html#a6166332 Sent from the JQuery forum at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Autocompleter update
On 06/09/06, Dylan Verheul [EMAIL PROTECTED] wrote: Plugin: Autocompleter Url: http://www.dyve.net/jquery?autocomplete Docs: http://www.dyve.net/jquery/autocomplete.txt New options: The options below provide a better user experience (automatically picking results) and advanced markup options (the approach is a little different, but this could be used to duplicate the script.aculo.us demo with pictures in the results). selectFirst (default value: false) If this is set to true, the first autocomplete value will be automatically selected on tab/return, even if it has not been handpicked by keyboard or mouse action. If there is a handpicked (highlighted) result, that result will take precedence. selectOnly (default value: false) If this is set to true, and there is only one autocomplete when the user hits tab/return, it will be selected even if it has not been handpicked by keyboard or mouse action. This overrides selectFirst. formatItem (default value: none) A JavaScript funcion that can provide advanced markup for an item. For each row of results, this function will be called. The returned value will be displayed inside an LI element in the results list. See the source code of http://www.dyve.net/jquery?autocomplete for an example. None of this will break compatibility, you can just use the new js without any changes to your existing code. Just keeps on getting better... I have a suggestion though - if the autocomplete goes off the page and you use the cursor keys, you cannot see the item that is highlighted. Perhaps the page should scroll to show the item - then when clicked, it scrolls back to the input box. You can see this if you go to the demo page and type in 'com' (as suggested in your documentation) and use the keyboard. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Autocompleter update
I've been thinking about an elegant way to deal with long resul lists, but I havent gotten my head arouns a workable solution that I can actually realize myself. I'm not that experience in je js/positioning/scrolling department. I think if you max-height the results UL you'll get scroling from the browser, but I haven't really tested it. On 9/6/06, Sam Collett [EMAIL PROTECTED] wrote: On 06/09/06, Dylan Verheul [EMAIL PROTECTED] wrote: Plugin: Autocompleter Url: http://www.dyve.net/jquery?autocomplete Docs: http://www.dyve.net/jquery/autocomplete.txt New options: The options below provide a better user experience (automatically picking results) and advanced markup options (the approach is a little different, but this could be used to duplicate the script.aculo.us demo with pictures in the results). selectFirst (default value: false) If this is set to true, the first autocomplete value will be automatically selected on tab/return, even if it has not been handpicked by keyboard or mouse action. If there is a handpicked (highlighted) result, that result will take precedence. selectOnly (default value: false) If this is set to true, and there is only one autocomplete when the user hits tab/return, it will be selected even if it has not been handpicked by keyboard or mouse action. This overrides selectFirst. formatItem (default value: none) A JavaScript funcion that can provide advanced markup for an item. For each row of results, this function will be called. The returned value will be displayed inside an LI element in the results list. See the source code of http://www.dyve.net/jquery?autocomplete for an example. None of this will break compatibility, you can just use the new js without any changes to your existing code. Just keeps on getting better... I have a suggestion though - if the autocomplete goes off the page and you use the cursor keys, you cannot see the item that is highlighted. Perhaps the page should scroll to show the item - then when clicked, it scrolls back to the input box. You can see this if you go to the demo page and type in 'com' (as suggested in your documentation) and use the keyboard. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Logger
This is a logger script that I use it while developing. I thought it might be usefull to you too. http://interface.eyecon.ro/develop/ilogger.html It can be used to send message to the loggin panel, to log objects and dom elements, intercepts errors etc. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] So I guess Ajax is the end of the web
The beauty of jQuery is that all the nasty, cross-browser incompatibility stuff is kept under the hood. Even if the next ECMA standard horribly breaks existing Javascript implementations - which surely it won't, any more than Adobe would release a backwards-incompatible version of Flash - the jQ library could be rewritten to accommodate it so that all our $(...) statements work as before. -- Chris Ovenden http://thepeer.blogspot.com Imagine all the people / Sharing all the world ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jCarousel
Jan, Do you think it'd be possible to do array re-ordering so that, when you get to the end of a list of images, pressing the next (right) button, it'll carry on, instead of either having a ghosted image, or returning you to the start? Also, I think it'd be great to add something into the autoscroll to continue scrolling if the jCarousel hasn't been interacted with for a few seconds (which can be specified by the user). Something like: AutoScrollContinue: 5 This would force the autoscroll to kick back in after 5 seconds, if buttons or images aren't clicked. -- View this message in context: http://www.nabble.com/jCarousel-tf2205628.html#a6168365 Sent from the JQuery forum at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] form elements
i have a form with id=profile_form, how can i select all form elements, but not other elements inside form tag? $('#profile_form').children(pattern); pattern = /input|textarea|select/ can i do something like: $('#profile_form').children('input').name('first_name') to get input field with name 'first_name'? Aljosa Mohorovic ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Autocompleter update
On 06/09/06, Dylan Verheul [EMAIL PROTECTED] wrote: I've been thinking about an elegant way to deal with long resul lists, but I havent gotten my head arouns a workable solution that I can actually realize myself. I'm not that experience in je js/positioning/scrolling department. I think if you max-height the results UL you'll get scroling from the browser, but I haven't really tested it. If you put this at the end of moveSelect it scrolls into view when an item is selected. lis[active].scrollIntoView(false); Tested it in IE and Firefox. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jCarousel
Dan Atkinson wrote: Do you think it'd be possible to do array re-ordering so that, when you get to the end of a list of images, pressing the next (right) button, it'll carry on, instead of either having a ghosted image, or returning you to the start? Do i understand you right, you mean that it'll carry on scrolling to the right starting again with the first image? Something like in an infinite loop? Btw, what do you mean with ghosted image? Dan Atkinson wrote: Also, I think it'd be great to add something into the autoscroll to continue scrolling if the jCarousel hasn't been interacted with for a few seconds (which can be specified by the user).br / Something like: AutoScrollContinue: 5 This would force the autoscroll to kick back in after 5 seconds, if buttons or images aren't clicked. That should be no problem... Jan -- View this message in context: http://www.nabble.com/jCarousel-tf2205628.html#a6168755 Sent from the JQuery forum at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] form elements
On 06/09/06, Aljosa Mohorovic [EMAIL PROTECTED] wrote: i have a form with id=profile_form, how can i select all form elements, but not other elements inside form tag? $('#profile_form').children(pattern); pattern = /input|textarea|select/ $('#profile_form').find(input,textarea,select); can i do something like: $('#profile_form').children('input').name('first_name') to get input field with name 'first_name'? Aljosa Mohorovic $('#profile_form').find([EMAIL PROTECTED]) ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Autocompleter update
works like a charm :-) thanks! I'll update the official version soon. On 9/6/06, Sam Collett [EMAIL PROTECTED] wrote: On 06/09/06, Dylan Verheul [EMAIL PROTECTED] wrote: I've been thinking about an elegant way to deal with long resul lists, but I havent gotten my head arouns a workable solution that I can actually realize myself. I'm not that experience in je js/positioning/scrolling department. I think if you max-height the results UL you'll get scroling from the browser, but I haven't really tested it. If you put this at the end of moveSelect it scrolls into view when an item is selected. lis[active].scrollIntoView(false); Tested it in IE and Firefox. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] form elements
thanks, it looks simple now 8-) On 9/6/06, Sam Collett [EMAIL PROTECTED] wrote: On 06/09/06, Aljosa Mohorovic [EMAIL PROTECTED] wrote: i have a form with id=profile_form, how can i select all form elements, but not other elements inside form tag? $('#profile_form').children(pattern); pattern = /input|textarea|select/ $('#profile_form').find(input,textarea,select); can i do something like: $('#profile_form').children('input').name('first_name') to get input field with name 'first_name'? Aljosa Mohorovic $('#profile_form').find([EMAIL PROTECTED]) ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Autocompleter update
One small bug. I use keyboard navigation to highlight options and after that I move the mouse. Then two options get highlighted.2006/9/6, Sam Collett [EMAIL PROTECTED]:On 06/09/06, Dylan Verheul [EMAIL PROTECTED] wrote: I've been thinking about an elegant way to deal with long resul lists, but I havent gotten my head arouns a workable solution that I can actually realize myself. I'm not that experience in je js/positioning/scrolling department. I think if you max-height the results UL you'll get scroling from the browser, but I haven't really tested it.If you put this at the end of moveSelect it scrolls into view when an item is selected.lis[active].scrollIntoView(false);Tested it in IE and Firefox.___jQuery mailing listdiscuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Autocompleter update
You're right. I'll fix it in the next version. Thanks. On 9/6/06, Stefan Petre [EMAIL PROTECTED] wrote: One small bug. I use keyboard navigation to highlight options and after that I move the mouse. Then two options get highlighted. 2006/9/6, Sam Collett [EMAIL PROTECTED]: On 06/09/06, Dylan Verheul [EMAIL PROTECTED] wrote: I've been thinking about an elegant way to deal with long resul lists, but I havent gotten my head arouns a workable solution that I can actually realize myself. I'm not that experience in je js/positioning/scrolling department. I think if you max-height the results UL you'll get scroling from the browser, but I haven't really tested it. If you put this at the end of moveSelect it scrolls into view when an item is selected. lis[active].scrollIntoView(false); Tested it in IE and Firefox. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Checked input box
I can check a chekckbox input Something that it input type=checkbox id=mycheck $(#mycheck).checked(); and return true or false Thk. Giro. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Autocompleter update
On 06/09/06, Dylan Verheul [EMAIL PROTECTED] wrote: works like a charm :-) thanks! I'll update the official version soon. As I am not sure if it will cause problems in other browsers (it is not a W3C DOM function), there should probably be a check: if(lis[active].scrollIntoView) lis[active].scrollIntoView(false); On 9/6/06, Sam Collett [EMAIL PROTECTED] wrote: On 06/09/06, Dylan Verheul [EMAIL PROTECTED] wrote: I've been thinking about an elegant way to deal with long resul lists, but I havent gotten my head arouns a workable solution that I can actually realize myself. I'm not that experience in je js/positioning/scrolling department. I think if you max-height the results UL you'll get scroling from the browser, but I haven't really tested it. If you put this at the end of moveSelect it scrolls into view when an item is selected. lis[active].scrollIntoView(false); Tested it in IE and Firefox. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Thickbox 2.1 crashes Opera 9.01
Hi, The value of '//:' for the src attribute of the iframe, that is appended to the body, lets Opera 9.01 crash (Win XP). We are using the same value in jQuery, but fortunately it is hidden away from Opera through browser sniffing. I changed it to 'about:blank', but I'm not sure if that fixes the https problem. I think I once used 'javascript:;' which worked without security warning as well. Does anyone know a value for the src attribute that does not trigger security warnings? I cannot test at the moment. -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Checked input box
$('#mycheck').attr(checked) On 9/6/06, David Gironella [EMAIL PROTECTED] wrote: I can check a chekckbox input Something that it input type=checkbox id=mycheck $('#mycheck').checked(); and return true or false ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Checked input box
This always return to me null, if checkbox is checked or not. Try this: $('#mycheck')[0].checked ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Checked input box
You're right, but it should work. Anyone else? js: $(#bar).click(function() { var checked = $(#foo).attr(checked); $(#foo).attr(checked, !checked); }); html: input id=foo type=checkbox value=OK / input id=bar type=button value=Test / result: first click of the button sets the checkbox to checked, next clicks it remains checked. On 9/6/06, David Gironella [EMAIL PROTECTED] wrote: This always return to me null, if checkbox is checked or not. Giro. -Mensaje original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En nombre de Dylan Verheul Enviado el: miércoles, 06 de septiembre de 2006 14:42 Para: jQuery Discussion. Asunto: Re: [jQuery] Checked input box $('#mycheck').attr(checked) On 9/6/06, David Gironella [EMAIL PROTECTED] wrote: I can check a chekckbox input Something that it input type=checkbox id=mycheck $('#mycheck').checked(); and return true or false ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Checked input box
try $('#mycheck')[0].checked checked is one of those attributes that won't work well with getAttribute and setAttribute cross browser. -- Klaus David Gironella schrieb: This always return to me null, if checkbox is checked or not. Giro. -Mensaje original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En nombre de Dylan Verheul Enviado el: miércoles, 06 de septiembre de 2006 14:42 Para: jQuery Discussion. Asunto: Re: [jQuery] Checked input box $('#mycheck').attr(checked) On 9/6/06, David Gironella [EMAIL PROTECTED] wrote: I can check a chekckbox input Something that it input type=checkbox id=mycheck $('#mycheck').checked(); and return true or false ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Checked input box
Yes, this work. Thk. Giro. -Mensaje original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En nombre de Mike Alsup Enviado el: miércoles, 06 de septiembre de 2006 15:39 Para: jQuery Discussion. Asunto: Re: [jQuery] Checked input box This always return to me null, if checkbox is checked or not. Try this: $('#mycheck')[0].checked ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] checkbox items with same name
i have 5 checkbox items with same name: input name=geographic value=1 type=checkbox input name=geographic value=2 type=checkbox input name=geographic value=3 type=checkbox input name=geographic value=4 type=checkbox input name=geographic value=5 type=checkbox and option to select multiple elements with same name must work. $('#form_name').find([EMAIL PROTECTED]@checked]) gives me only one element. how can i use checkbox elements like select tag? Aljosa Mohorovic ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] checkbox items with same name
On 9/6/06, Aljosa Mohorovic [EMAIL PROTECTED] wrote: i have 5 checkbox items with same name:input name=geographic value=1 type=checkboxinput name=geographic value=2 type=checkbox input name=geographic value=3 type=checkboxinput name=geographic value=4 type=checkboxinput name=geographic value=5 type=checkbox and option to select multiple elements with same name must work.$('#form_name').find([EMAIL PROTECTED]@checked]) gives me onlyone element.how can i use checkbox elements like select tag? Aljosa MohorovicGet all element with the geographic id by doing:$('#geographic')Then you can reference the DOM object as an array like:alert($('#geographic')[4].value)); This should alert 5 which is the value of the fifth element in base 0 indexed array.If you want to do something on all of the checkboxes with jQuery use:$('#geographic').each(function { yourFunctionHere })Hope this helps. :)-- Shawn TumeyCofounderMT Web Productions LLC ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] checkbox items with same name
I think that this might work, though I haven't tried combining attribute tests and pseudo classes before: $('[EMAIL PROTECTED]:checked') Shawn's solution below won't work for you because it is searching on ids rather than names, which is what you have. Shawn Tumey wrote: On 9/6/06, *Aljosa Mohorovic* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: i have 5 checkbox items with same name: input name=geographic value=1 type=checkbox input name=geographic value=2 type=checkbox input name=geographic value=3 type=checkbox input name=geographic value=4 type=checkbox input name=geographic value=5 type=checkbox and option to select multiple elements with same name must work. $('#form_name').find([EMAIL PROTECTED]@checked]) gives me only one element. how can i use checkbox elements like select tag? Aljosa Mohorovic Get all element with the geographic id by doing: $('#geographic') Then you can reference the DOM object as an array like: alert($('#geographic')[4].value)); This should alert 5 which is the value of the fifth element in base 0 indexed array. If you want to do something on all of the checkboxes with jQuery use: $('#geographic').each(function { yourFunctionHere }) Hope this helps. :) -- Shawn Tumey Cofounder MT Web Productions LLC ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] slideDown callback problem
Been playing with the accordion function over @ http://fmarcia.info/jquery/accordion.html Couldn't get it to work with the latest jQuery build until I noticed something weird: The script worked when I change the running variable to "3": running = 3; Upon further investigation, it appears the the slideDown call is firing the callback twice. If you run the following code, you'll notice that the slideUp callback alerts once and the slideDown callback alerts twice. Is this a bug or am I misunderstanding something? !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"htmlheadtitle/titlescript type="text/_javascript_" src=""/scriptscript language="_javascript_" type="text/_javascript_"//![CDATA[$.accordian = function(l, b, a) { var active = a,running = 0;$(b).not(active).hide();$(l).click(function(e){var p = $('div', this.parentNode);if (running || !p.is(":hidden")) return false;running = 2;$(active).slideUp('fast', function(){--running;alert('sliding Up ' + running);});active = '#' + p.slideDown('slow', function(){--running;alert('sliding Down ' + running);}).get(0).id;return false;})};$(document).ready(function(){$.accordian('#main/div/a','#main/div/div','#diva');});//]]/script/headbodydiv id="main" div id="div1"a href=""Title of First Level/adiv id="diva" divconsectetuer adipiscing elitbr/Sed lorem leobr/lorem leo consectetuer adipiscing elitbr/Phasellus sem leo /div/div /div div id="div2"a href=""Title of Second Level/adiv id="divb" divbibendum at, erosbr/Cras at mi et tortor egestas vestibulumbr/Phasellus sem leo /div/div /div div id="div3"a href=""Title of Third Level/adiv id="divc" divMorbi eros massabr/interdum et, vestibulum id, rutrum necbr/bibendum at, erosbr/Cras at mi et tortor egestas vestibulumbr/Phasellus sem leo /div/div /div/div/body/html Thanks for any help! Neil ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] checkbox items with same name
On 9/6/06, Stephen Howard [EMAIL PROTECTED] wrote: Shawn's solution below won't work for you because it is searching on idsrather than names, which is what you have.DOH. My bad. Setphen is correct, my solution won't work. I almost never use the name attribute any more, I always use id. I need to read more carefully.-- Shawn TumeyCofounderMT Web Productions LLC ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Suggesting some improvements
Hi, I had some time and used it to read through the current SVN-code searching for possible improvements. My time was not enough to go through all the code, but at least I could check jquery.js. I have some suggestions which you might whant to evaluate. I. each --- This implementation is a bit longer but should usually be faster as well: each: Array.forEach?function( obj, fn, args ) { var fe = (obj.length == undefined)? function(o,f) { for( var i in o ) f.call(o[i],i); }:Array.forEach; if( args ) fe(obj,function(o){ fn.apply(o,args); }); else fe(obj,function(o,i){ fn.apply(o,[i,o]); }); return obj; }:function( obj, fn, args ) { var fe = (obj.length == undefined)? function(o,f) { for( var i in o ) f.call(o[i],i); }:function(o,f) { for( var i = 0; i o.length; i++ ) f.call(o[i],i); }; if( args ) fe(obj,function(o){ fn.apply(o,args); }); else fe(obj,function(o,i){ fn.apply(o,[i,o]); }); return obj; }, 1. In case a native implementation is available I expect it to be faster than any other possible solution (use Array.forEach if avaliable). 2. I took the check for the parameter 'args' out of the loop. It only has to be evaluated once. II. className - className: { add: function(o,c){ if (jQuery.className.has(o,c)) return; o.className += ( o.className ? : ) + c; }, remove: function(o,c){ if( !c ) { o.className = ''; return; } var cns = o.className.split(' '); var cns2 = []; for( var i = 0; i cns.length; i++ ) if( cns[i] != c ) cns2.push(cns[i]); o.className = cns2.join(' '); }, has: function(e,a) { if ( e.className != undefined ) e = e.className; var cns = e.split(' '); for( var i = 0; i cns.length; i++ ) if( cns[i] != a ) return true; return false; } }, I'm not shure if that really speeds up things so much. Generally speaking regular expressions need more calculations to be evaluated than a simple character comparisions. I guess, many people use these className-manipulation functions quite often. III new function() {...} I am pretty shure that (function() {...})() is faster. You spare the creation of an object that you never use for each of these constructs. On the other hand I have not found these constructs in some inner loops yet. The overhead might be acceptable here, but I also don't think that new function() {...} is less readable than (function() {...})(). I have not measured these suggestions now. What do you think about them? Christof ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Thickbox 2.1 crashes Opera 9.01
Can anyone else confirm this? My opera is having proxy issues at the moment. Jonathan Sharp wrote: We've tried javascript:void(0) which has worked on occasion. We eventually broke down and created a static blank page and set the URL... -js On 9/6/06, Klaus Hartl [EMAIL PROTECTED] wrote: Hi, The value of '//:' for the src attribute of the iframe, that is appended to the body, lets Opera 9.01 crash (Win XP). We are using the same value in jQuery, but fortunately it is hidden away from Opera through browser sniffing. I changed it to 'about:blank', but I'm not sure if that fixes the https problem. I think I once used 'javascript:;' which worked without security warning as well. Does anyone know a value for the src attribute that does not trigger security warnings? I cannot test at the moment. -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- View this message in context: http://www.nabble.com/Thickbox-2.1-crashes-Opera-9.01-tf2226660.html#a6173940 Sent from the JQuery forum at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Autocompleter update
Great plugin. I found a couple of items: Using FF 1.5.0.6, when I type com and get the suggestions then use the down/up cursor keys, the cursor keys skip every other suggestion (i.e. pressing down moves the highlight down two suggestions). Also, if I use the cursor keys and press return or tab, the alert comes up and the textfield is cleared. If I select a suggestion with the mouse, the alert comes up and the selection is placed in the textfield. Hmmm. It looks like I caught you mid-update. I just tried this in IE, and IE showed both the common and scientific name (two lines, with the above issues not occurring). Going back to FF, now it shows both the common and scientific name and no longer has the problems. However, IE and FF don't display the suggestions the same way. I'll take a look again later today to see if things have settled. BTW: To you or other jQueryists: There are several autocomplete plugins that I am aware of: http://www.dyve.net/jquery/?autocomplete, http://interface.eyecon.ro/demos/autocompleter.html, http://www.webunity.nl/_test/jquery/autocomplete.html, http://www.stilbuero.de/demo/jquery/autocomplete.html. This one, Dylan's, is working with the current jQuery and seems the most complete. Why would I use the others? Are the other plugins being maintained? Also, could we [or should we] recommend certain plugins over their siblings on the jQuery plugin page http://jquery.com/plugins/? I'm afflicted with that Engineering disease where if I have choices, I must test all choices to find the best one. However, if one plugin was recommended by the jQuery community, I'd [likely] use that one without hesitation. jrk Dylan Verheul wrote: Plugin: Autocompleter Url: http://www.dyve.net/jquery?autocomplete -- View this message in context: http://www.nabble.com/Autocompleter-update-tf2225088.html#a6173939 Sent from the JQuery forum at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Autocompleter update
On 06/09/06, Sam Collett [EMAIL PROTECTED] wrote: On 06/09/06, Dylan Verheul [EMAIL PROTECTED] wrote: works like a charm :-) thanks! I'll update the official version soon. As I am not sure if it will cause problems in other browsers (it is not a W3C DOM function), there should probably be a check: if(lis[active].scrollIntoView) lis[active].scrollIntoView(false); Correction (causes error if no matches were found and a cursor key is pressed): if(lis[active] lis[active].scrollIntoView) lis[active].scrollIntoView(false); On 9/6/06, Sam Collett [EMAIL PROTECTED] wrote: On 06/09/06, Dylan Verheul [EMAIL PROTECTED] wrote: I've been thinking about an elegant way to deal with long resul lists, but I havent gotten my head arouns a workable solution that I can actually realize myself. I'm not that experience in je js/positioning/scrolling department. I think if you max-height the results UL you'll get scroling from the browser, but I haven't really tested it. If you put this at the end of moveSelect it scrolls into view when an item is selected. lis[active].scrollIntoView(false); Tested it in IE and Firefox. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] $.posting Array of Checkboxes
Hey... im trying to post via ajax an array of checkboxes with the same id..if i do:$(.btn).click( function(){ $.post(request.cfm,{ valor: $(#checkboxes).value }, function(){ //any callback }});on firebug i see the posting is only sending the 1st value of 4 #checkboxes in the form...Any one knows why?? ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] $.posting Array of Checkboxes
im trying to post via ajax an array of checkboxes with the same id. The id attribute for an element must be unique in the document. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] $.posting Array of Checkboxes
Rafael Santos schrieb: Hey... im trying to post via ajax an array of checkboxes with the same id.. if i do: $(.btn).click( function(){ $.post(request.cfm,{ valor: $(#checkboxes).value }, function(){ //any callback } }); on firebug i see the posting is only sending the 1st value of 4 #checkboxes in the form... Any one knows why?? Hi, just a quick guess: shouldn't your IDs (#) be unique? Bye, Marc -- ___ terrestris GbR Marc Jansen Siemensstr. 8 D-53121 Bonn T: ++49 (0)228 - 962 899 54 F: ++49 (0)228 - 962 899 57 Email: [EMAIL PROTECTED] Internet: www.terrestris.de ___ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Autocompleter update
I've updated the plugin with the changes and fixes discussed in this thread. Thanks Sam for the scrollIntoView tip, and to those that reported bugs. On 9/6/06, Dylan Verheul [EMAIL PROTECTED] wrote: Plugin: Autocompleter Url: http://www.dyve.net/jquery?autocomplete Docs: http://www.dyve.net/jquery/autocomplete.txt New options: The options below provide a better user experience (automatically picking results) and advanced markup options (the approach is a little different, but this could be used to duplicate the script.aculo.us demo with pictures in the results). selectFirst (default value: false) If this is set to true, the first autocomplete value will be automatically selected on tab/return, even if it has not been handpicked by keyboard or mouse action. If there is a handpicked (highlighted) result, that result will take precedence. selectOnly (default value: false) If this is set to true, and there is only one autocomplete when the user hits tab/return, it will be selected even if it has not been handpicked by keyboard or mouse action. This overrides selectFirst. formatItem (default value: none) A JavaScript funcion that can provide advanced markup for an item. For each row of results, this function will be called. The returned value will be displayed inside an LI element in the results list. See the source code of http://www.dyve.net/jquery?autocomplete for an example. None of this will break compatibility, you can just use the new js without any changes to your existing code. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Bug with .css('z-index', '2')
I also have the same exact problem. 'Z-index' worked perfectly in 1.0, but not in 1.01 when using IE. I will try your fix and let you know what the result is. -Isaac aedmonds wrote: Wanted to say that $().css('z-index', '2') does not work in IE but does work in FF. What will work in both browsers is $().css('zIndex', '2'). Not sure if this is a bug but it did throw me for a loop for a few minutes. I actually just noticed it because 'z-index' was working fine pre-1.0. I'm currently using Rev: 249. Can anyone else confirm this? -Aaron -- View this message in context: http://www.nabble.com/Bug-with-.css%28%27z-index%27%2C-%272%27%29-tf2224146.html#a6175733 Sent from the JQuery forum at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Get array of all DOM attributes for a set
what about plural functions that would return an array of the requested attribute values from all of the elements? Your approach could be generalized for attributes (and css similarly) like this--untested: jQuery.fn.attrs = function(n,a){ if ( a ) return this.each(function(i){this.attr(n,a[i]);}); a = []; for ( var i=0; i n; i++ ) a.push(this[i].attr(n)); return a; }; var isDisabled = $(.boxes).attrs(disabled); isDisabled[0] = true; isDisabled[1] = false; $(.boxes).attrs(disabled, isDisabled); If you pass an array as the second item then it sets the corresponding attrs and returns the original jQuery object so you can continue to chain methods. If you don't pass an array it retrieves the attrs as an array of values. Really, the current .attr() method could look to see if its second argument was an array and do the same magic as above for setting values. The tricky part is retrieving values, since Javascript doesn't have a feature like Perl's wantarray to tell you whether the caller expects an array or not. I guess that means we still need the pluralized form. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] $.posting Array of Checkboxes
yeah... but the checkboxes are created dinamically... so i can have one checkbox or 20 checkboxes, how do i post these ones??2006/9/6, Marc Jansen [EMAIL PROTECTED]:Rafael Santos schrieb: Hey... im trying to post via ajax an array of checkboxes with the same id.. if i do: $(.btn).click( function(){ $.post(request.cfm,{valor: $(#checkboxes).value }, function(){ //any callback } }); on firebug i see the posting is only sending the 1st value of 4 #checkboxes in the form... Any one knows why??Hi,just a quick guess: shouldn't your IDs (#) be unique? Bye,Marc--___terrestrisGbRMarc JansenSiemensstr. 8D-53121 BonnT: ++49 (0)228 - 962 899 54F: ++49 (0)228 - 962 899 57 Email: [EMAIL PROTECTED]Internet: www.terrestris.de__ jQuery mailing listdiscuss@jquery.comhttp://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] update a div within a submit
hi to all. sorry for the dumb question, I'm a total noobie of jquery. I just want to ask what's the equivalent code of updating a div with the results of a form action when hitting a submit button of jquery instead of scriptaculous and prototype. I've read jquery docs but I found them a little confusing. thanks in advance. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Bug with .css('z-index', '2')
I just tested your fix and it worked perfectly. Thanks for your post. My head was spinning for a while... Isaac Weinhausen wrote: I also have the same exact problem. 'Z-index' worked perfectly in 1.0, but not in 1.01 when using IE. I will try your fix and let you know what the result is. -Isaac aedmonds wrote: Wanted to say that $().css('z-index', '2') does not work in IE but does work in FF. What will work in both browsers is $().css('zIndex', '2'). Not sure if this is a bug but it did throw me for a loop for a few minutes. I actually just noticed it because 'z-index' was working fine pre-1.0. I'm currently using Rev: 249. Can anyone else confirm this? -Aaron -- View this message in context: http://www.nabble.com/Bug-with-.css%28%27z-index%27%2C-%272%27%29-tf2224146.html#a6176258 Sent from the JQuery forum at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Thickbox 2.1 crashes Opera 9.01
I use javascript:document.write('') On 9/6/06, Jonathan Sharp [EMAIL PROTECTED] wrote: We've tried javascript:void(0) which has worked on occasion. We eventually broke down and created a static blank page and set the URL... -js On 9/6/06, Klaus Hartl [EMAIL PROTECTED] wrote: Hi, The value of '//:' for the src attribute of the iframe, that is appended to the body, lets Opera 9.01 crash (Win XP). We are using the same value in jQuery, but fortunately it is hidden away from Opera through browser sniffing. I changed it to 'about:blank', but I'm not sure if that fixes the https problem. I think I once used 'javascript:;' which worked without security warning as well. Does anyone know a value for the src attribute that does not trigger security warnings? I cannot test at the moment. -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Bug with .css('z-index', '2')
Actually, in DOM terms, zIndex is the only correct name. On 9/6/06, Isaac Weinhausen [EMAIL PROTECTED] wrote: I just tested your fix and it worked perfectly. Thanks for your post. My head was spinning for a while... Isaac Weinhausen wrote: I also have the same exact problem. 'Z-index' worked perfectly in 1.0, but not in 1.01 when using IE. I will try your fix and let you know what the result is. -Isaac aedmonds wrote: Wanted to say that $().css('z-index', '2') does not work in IE but does work in FF. What will work in both browsers is $().css('zIndex', '2'). Not sure if this is a bug but it did throw me for a loop for a few minutes. I actually just noticed it because 'z-index' was working fine pre-1.0. I'm currently using Rev: 249. Can anyone else confirm this? -Aaron -- View this message in context: http://www.nabble.com/Bug-with-.css%28%27z-index%27%2C-%272%27%29-tf2224146.html#a6176258 Sent from the JQuery forum at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] $.posting Array of Checkboxes
Don't give them an id, give them a name. On 9/6/06, Rafael Santos [EMAIL PROTECTED] wrote: yeah... but the checkboxes are created dinamically... so i can have one checkbox or 20 checkboxes, how do i post these ones?? 2006/9/6, Marc Jansen [EMAIL PROTECTED]: Rafael Santos schrieb: Hey... im trying to post via ajax an array of checkboxes with the same id.. if i do: $(.btn).click( function(){ $.post(request.cfm,{ valor: $(#checkboxes).value }, function(){ //any callback } }); on firebug i see the posting is only sending the 1st value of 4 #checkboxes in the form... Any one knows why?? Hi, just a quick guess: shouldn't your IDs (#) be unique? Bye, Marc -- ___ terrestris GbR Marc Jansen Siemensstr. 8 D-53121 Bonn T: ++49 (0)228 - 962 899 54 F: ++49 (0)228 - 962 899 57 Email: [EMAIL PROTECTED] Internet: www.terrestris.de ___ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Bug with .css('z-index', '2')
Right... but for CSS properties I believe z-index is the only correct name for the zIndex property. Maybe I'm wrong but do know you set zIndex by using p { z-index: 2; } I guess I've really never tried p { zIndex: 2; } -Aaron Dylan Verheul wrote: Actually, in DOM terms, zIndex is the only correct name. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- View this message in context: http://www.nabble.com/Bug-with-.css%28%27z-index%27%2C-%272%27%29-tf2224146.html#a6176674 Sent from the JQuery forum at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Bug with .css('z-index', '2')
True. What's difficult from a semantics perspective, is that the method name 'css' connotes that css properties should be acceptible parameters. If this method is only allowed to accept style keys, then perhaps the method name ought to change. Just some thoughts... Dylan Verheul wrote: Actually, in DOM terms, zIndex is the only correct name. On 9/6/06, Isaac Weinhausen [EMAIL PROTECTED] wrote: I just tested your fix and it worked perfectly. Thanks for your post. My head was spinning for a while... Isaac Weinhausen wrote: I also have the same exact problem. 'Z-index' worked perfectly in 1.0, but not in 1.01 when using IE. I will try your fix and let you know what the result is. -Isaac aedmonds wrote: Wanted to say that $().css('z-index', '2') does not work in IE but does work in FF. What will work in both browsers is $().css('zIndex', '2'). Not sure if this is a bug but it did throw me for a loop for a few minutes. I actually just noticed it because 'z-index' was working fine pre-1.0. I'm currently using Rev: 249. Can anyone else confirm this? -Aaron -- View this message in context: http://www.nabble.com/Bug-with-.css%28%27z-index%27%2C-%272%27%29-tf2224146.html#a6176258 Sent from the JQuery forum at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- View this message in context: http://www.nabble.com/Bug-with-.css%28%27z-index%27%2C-%272%27%29-tf2224146.html#a6176751 Sent from the JQuery forum at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Bug with .css('z-index', '2')
From: Dylan Verheul Actually, in DOM terms, zIndex is the only correct name. From: aedmonds Right... but for CSS properties I believe z-index is the only correct name for the zIndex property. Maybe I'm wrong but do know you set zIndex by using p { z-index: 2; } I guess I've really never tried p { zIndex: 2; } Nor would you want to. It's always names-like-this in CSS code and namesLikeThis in the DOM. -Mike ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Need help with the CSS selector - :not()
Hi again. Thanks for the replies John and Klaus I did not get :not() to work but I finally got it to work using jQuery's .not() function. This is how I finally solved it, thanks to the tips from both John and Klaus --- $('body [EMAIL PROTECTED]' + rel + ']:not([href$=' + src.substring(src.lastIndexOf('/')) +'])').each(function() {}); Regards Jimmy Hi, maybe you ran into the problem that different browsers return different values for the href attribute if the value itself (in your html source) is a relative link. If src is something like /relative/path/to/somewhere try the following snippet: $('[EMAIL PROTECTED]' + rel + ']:not([EMAIL PROTECTED]' + src +'])').each(function() { alert(this.href + '\n' + src); }); I think you can leave out the body selector here, links cannot occur outside the body anyway. Or you can try to use the not function, but this should have the same result: $('[EMAIL PROTECTED]' + rel + ']).not('[EMAIL PROTECTED]' + src +'])').each(function() { alert(this.href + '\n' + src); }); -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Bug in animate or am I doing something wrong?
Hello everybody. I have a div which I am changing size and position for with the animate function but when the animation is completed the div ends up beeing semi-transparent. The div has the following css-properties #box { position: absolute; background: #FF; top: 200px; width: 225px; height: 200px; border: 10px solid #FF; text-align: left; } The animation code $('#box').animate({ 'height': 400, 'top': 100 }); ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Bug with .css('z-index', '2')
Hi there, my idea: I'll change the css() function, so you can supply the correct css definition or the javascript attribute, i.e: $().css(zIndex, 2) And $().css(z-index, 2) will do the same. This is achieved by doing the following on the second method: 1) First, try to read the attribute from DOMelement.z-index, if this returns null, then 2) get the style string via DOMelement.getAttribute(style), which returns the proper css definitions, 3) split into array via split(;) 4) if z-index is found, change it and merge the array again, then do setAttribute(style, mergedArray) 5) if z-index is not found, add it to the array, merge it and to the same. Cool or not? Paul -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Michael Geary Gesendet: Mittwoch, 6. September 2006 20:41 An: 'jQuery Discussion.' Betreff: Re: [jQuery] Bug with .css('z-index', '2') From: Dylan Verheul Actually, in DOM terms, zIndex is the only correct name. From: aedmonds Right... but for CSS properties I believe z-index is the only correct name for the zIndex property. Maybe I'm wrong but do know you set zIndex by using p { z-index: 2; } I guess I've really never tried p { zIndex: 2; } Nor would you want to. It's always names-like-this in CSS code and namesLikeThis in the DOM. -Mike ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Semi-New jQuery Site Live
So, for now, just post messages to this thread and we can sort thingsout as they come in.A friend of mine pointed out another issue with the semi-new jquery.com. It has to do with the design, not the content, so please forgive me if that makes this post off-topic. Just trying to help out... In IE6 (surprise, surprise) the top of the logo and "jQuery" are cut off. It looks like this could be fixed pretty easily without any effect on Firefox or Safari by changing the "top" property of .wrap2 from 25px to 15px and deleting margin-top: -10px from h1.So the two styles would look like this:.wrap2 { z-index: 30; position: relative; text-align: left; margin: 0 auto; width: 800px; top: 15px; padding: 0 15px 15px 15px;}h1 { color: #fff;}Cheers,Karl___Karl Swedbergwww.englishrules.comwww.learningjquery.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] AJAX/JS Developer Wanted for Semi-Permanent Contract
AJAX/JS Developer Wanted for Semi-Permanent Contract The Company: A small established company targeting a vertical market. Very experienced core staff in both technology and launching dot-coms. We're based in Los Angeles. The Task: Take an existing web presence which has been held together with spit and duct tape and turn it into something beautiful. This will be done along two axes: one is the creation of a Drupal-based community site to compliment the web application and the other is to take the existing code base and un-do the Crimes Against Nature which were coded into it, converting it to an AJAX/JS-based foundation. The Candidate: We're looking for someone who can walk on water and chew gum at the same time. That is, know your stuff and be able to make good technical decisions on the fly. Migrating the existing code base means ripping a lot of bad code out, but also building a useful library of utility classes and functions along the way. So an eperienced hand is preferred. Solid experience with Dojo and/or jQuery is required (or at least as solid as is possible with stuff that's so new). Solid LAMP development experience is required - you should be totally comfortable working from a shell prompt. The Job: Ideally we want someone to be a semi-permanent contractor. Initially this will be a 40hr/wk affair, but once it settles down it'll taper off to half that. But it will be development that's ongoing for years to come. And we will be pushing the envelope in terms of what can be done with Drupal and AJAX, so once we get past this first chore it'll be a lot of fun stuff with very few limitations on what we can try to add. If interested, contact me at [EMAIL PROTECTED] ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Next Div
This is probably simple, but I keep messing it up. I have a list of anchor links with hidden divs between them. I want to put a toggle on all of the A links to open up the div which is right next to it. This is the code snippet: $(a.questionLink).toggle(function(){ $(div.NEXTDIV).slideDown(slow); },function(){ $(div. NEXTDIV).slideUp(slow); }); I am not sure if I should use E:first-of-type or next(). Thank you for the help! Glen ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Next Div
This ought to work: $(a.questionLink).toggle(function(){ $(this).next().slideDown(slow); },function(){ $(this).next().slideUp(slow); }); m. On Wed, 2006-09-06 at 13:30 -0700, Lipka, Glen wrote: This is probably simple, but I keep messing it up. I have a list of anchor links with hidden divs between them. I want to put a toggle on all of the A links to open up the div which is right next to it. This is the code snippet: $(a.questionLink).toggle(function(){ $(div.NEXTDIV).slideDown(slow); },function(){ $(div. NEXTDIV).slideUp(slow); }); I am not sure if I should use E:first-of-type or next(). Thank you for the help! Glen ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Bug in animate or am I doing something wrong?
I think I found the error... don't know if it's a bug in my styling or an error in jQuery though, perhaps somebody else could shine some light on this. I found out that whenever I use animate the div which is animated inherits the opacity of the parent div, even if the animated div has a different opacity setting. I would suspect that this is a bug since it should not (at least not to my knowledge) overwrite the set opacity setting - please comment on this Regrads Jimmy Hello everybody. I have a div which I am changing size and position for with the animate function but when the animation is completed the div ends up beeing semi-transparent. The div has the following css-properties #box { position: absolute; background: #FF; top: 200px; width: 225px; height: 200px; border: 10px solid #FF; text-align: left; } The animation code $('#box').animate({ 'height': 400, 'top': 100 }); ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Next Div
On Sep 6, 2006, at 4:30 PM, Lipka, Glen wrote:I have a list of anchor links with hidden divs between them.I want to put a toggle on all of the A links to open up the div which is right next to it. Try this: $("a.questionLink").toggle(function(){ $(this).next('div').slideDown("slow"); },function(){ $(this).next('div').slideUp("slow"); }); return false; }); Cheers,Karl___Karl Swedbergwww.englishrules.comwww.learningjquery.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Next Div
On Sep 6, 2006, at 4:44 PM, Karl Swedberg wrote:Try this: $("a.questionLink").toggle(function(){ $(this).next('div').slideDown("slow"); },function(){ $(this).next('div').slideUp("slow"); }); return false; }); Oops! It looks like I accidentally pasted an extra line at the end there -- });But you already figured it out anyway. ;-)___Karl Swedbergwww.englishrules.comwww.learningjquery.com___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] update a div within a submit
On Sep 6, 2006, at 13:32 , kain wrote: I just want to ask what's the equivalent code of updating a div with the results of a form action when hitting a submit button of jquery instead of scriptaculous and prototype. I think you're going to want to use the forms plugin for this. On this page: http://jquery.com/plugins you'll want Forms Plugin (with AJAX). With that included, you can simply do: $('#id-of-my-form').ajaxSubmit('#id-of-my-div'); and the form will automagically populate the div with its results. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] formdate still too slow !?
i hoped for the new release to fix it, but .formdata is still damn slow(at least for me 2-3s per .formdate() for a 9fields form)is there no faster way, to just get the formdata, maybe without serializing the whole form or sth else :/ (my last post)http://jquery.com/discuss/2006-August/009406/mfg M.G ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Patch for idrag.js
Hello, I've just started using jQuery and Interface, fantastic bit of kit I must say, it's a lot nicer than Yahoo UI's bloat. I've come across a small bug in Interfaces idrag.js regarding the onStop and onChange functionality - they didn't work! I've attached a patch to fix the problem. Cheers - Mark Gibson PS. Sorry if this isn't the right place, but I couldn't find a bug list, SF style management, etc. BTW. Is Interface accessible via anon CVS/SVN from anywhere? --- interface/idrag.js 2006-09-04 21:20:00.0 +0100 +++ DL-trunk/js/jquery/interface/idrag.js 2006-09-06 13:06:39.103470200 +0100 @@ -297,9 +297,10 @@ jQuery.iDrag.helper.css('cursor', 'move'); } + nx = dragged.dragCfg.oR.x + ((!dragged.dragCfg.axis || dragged.dragCfg.axis == 'horizontally') ? (dragged.dragCfg.nx - dragged.dragCfg.oC.x + dragged.dragCfg.diffX) : 0); + ny = dragged.dragCfg.oR.y + ((!dragged.dragCfg.axis || dragged.dragCfg.axis == 'vertically') ? (dragged.dragCfg.ny - dragged.dragCfg.oC.y + dragged.dragCfg.diffY) : 0); + if (dragged.dragCfg.revert == false) { - nx = dragged.dragCfg.oR.x + ((!dragged.dragCfg.axis || dragged.dragCfg.axis == 'horizontally') ? (dragged.dragCfg.nx - dragged.dragCfg.oC.x + dragged.dragCfg.diffX) : 0); - ny = dragged.dragCfg.oR.y + ((!dragged.dragCfg.axis || dragged.dragCfg.axis == 'vertically') ? (dragged.dragCfg.ny - dragged.dragCfg.oC.y + dragged.dragCfg.diffY) : 0); if (dragged.dragCfg.fx 0 nx != dragged.dragCfg.oC.x ny != dragged.dragCfg.oC.y) { x = new jQuery.fx(dragged,dragged.dragCfg.fx, 'left'); y = new jQuery.fx(dragged,dragged.dragCfg.fx, 'top'); @@ -351,8 +352,8 @@ if (dragged.dragCfg.onChange (nx != dragged.dragCfg.oR.x || ny != dragged.dragCfg.oR.y)){ dragged.dragCfg.onChange.apply(dragged, dragged.dragCfg.lastSi); } - if (dragged.dragCfg.onStart) - dragged.dragCfg.onStart.apply(elm); + if (dragged.dragCfg.onStop) + dragged.dragCfg.onStop.apply(elm); /*if (dragged dragged.dragCfg.prot == false) { if (dragged.dragCfg.ghosting == false) { @@ -657,7 +658,7 @@ hpc : o.hpc ? o.hpc : false, onDrag : {}, onStart : o.onStart o.onStart.constructor == Function ? o.onStart : false, - onStop : o.onStart o.onStart.constructor == Function ? o.onStop : false, + onStop : o.onStop o.onStop.constructor == Function ? o.onStop : false, onChange : o.onChange o.onChange.constructor == Function ? o.onChange : false, axis : /vertically|horizontally/.test(o.axis) ? o.axis : false ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Slding divs that are float left
I am using the latest jquery with the latest interface library ( they don't seem to have a forum anymore ) and have encountered some difficulty using the toggle blind effect. I have 2 div's side-by-side, one floated left. The idea is to put a button in between them, that will 'collapse' or 'expand' the left div. This is a common GUI element that you see all the time in programs like Dreamweaver and others. The left div has to be floated left, and when you click the collapse button, it does collapse, but first it knocks the right div down below the left div, and after the animation is complete, the right div jumps back up to the right of the collapsed-left div. Any idea on this? I had been using moo.fx on top of prototype lite to do this effect and it works a charm, but I have seen a lot of steam behind jquery and would like to use it if it can do this effect. Thanks, Cliff ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] $.WRAP is good, yet how about $.UNWRAP function? tips?
hey peeps, wonder what you all use or could use, to UNWAP a tag, after its been its been added with teh $.wrap() function for example: span id=removeMeP id=keepMe text /Petc.. /span so lets say you wanted to just keep the P tag, and unwarp the it, (drop span tag)? would be nice to just to do something like... $('removeMe').unwarp(); in turn would result in ..P id=keepMe text /P etc... what to drop only the span tag without too much effort., any quick or easy already exciting function that do this? thanks, -- Nilesh B. Patel define-web.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] performance bug with formdata()
i know found out why my submit was so damn slow...when you have a lot of options in your selectboxes, the serialize() takes very long to completeto ask for selected element was way faster.maybe not serializing the form, and just getting all the vars differently would speed things up. mfg M.G. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Bug with .css('z-index', '2')
Generally speaking, posting to the bug tracker is better (for real bugs) as it's better organized for me and easier for me to work through. However, if the issue isn't a real bug, just something you're not sure of, then I recommend first posting it to the list for discussion (and possible move to the tracker). In your particular case, I probably would've posted it as a bug to the tracker since .css(z-index,2) not working is obviously a bug. Don't worry about it though, it helps to clear these things up sometimes. --John Dang! I should have checked the bug tracker. What's your preference for items such as these? Post bugs here? In the bug tracker? Both? I don't want to be polluting anything... (maybe I'm doing it now) :-$ Amen to Isaac's post too. :D ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jCarousel
John Resig wrote: But while writing this, i got the following idea: Why not checking the nodeName and wrapping the html if its a UL or OL and leave it as it is otherwise? That's a perfect idea - I'd be totally game for that. --John I've released a new version which implements auto-wrapping of the required markup. Check http://sorgalla.com/projects/jcarousel/example_static_simple.html Thats just for you, lazy guy ;-) Jan -- View this message in context: http://www.nabble.com/jCarousel-tf2205628.html#a6182335 Sent from the JQuery forum at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] update a div within a submit
Pretty sure http://jquery.com/dev/svn/plugins/form/form.js is a newer more general version of that script i could be wrong. Jason Y 3spn.net Jonathan Chaffer wrote: On Sep 6, 2006, at 13:32 , kain wrote: I just want to ask what's the equivalent code of updating a div with the results of a form action when hitting a submit button of jquery instead of scriptaculous and prototype. I think you're going to want to use the forms plugin for this. On this page: http://jquery.com/plugins you'll want Forms Plugin (with AJAX). With that included, you can simply do: $('#id-of-my-form').ajaxSubmit('#id-of-my-div'); and the form will automagically populate the div with its results. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] AJAX loadIfModified() problems
I seem to be having some challenges with the loadIfModified(url) function. Is the remote HTML injected if anything is returned by the URL, or if only what is returned that the previous time the URL was queried? I'm building a web page that periodically polls the server to display the status (OK, busy, loading, etc.) The following code does not appear to work (in Firefox 1.5): setInterval(function() { $('#status-container').loadIfModified('status.jsp'); }, 1000); ... however, using the load function instead of loadIfModified does seem to work: setInterval(function() { $('#status-container').load('status.jsp'); }, 1000); Suggestions? ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] AJAX loadIfModified() problems
I'm building a web page that periodically polls the server to display the status (OK, busy, loading, etc.) jQuery doesn't actually check the returned contents from the server, instead it sends the If-Modified-Since header to the server and checks the Last-Modified response header coming back. Only if its the header has been modified will jQuery actually report the data as also being modified. This is an important distinction, and it relies upon your script (if you're displaying things dynamically) you need to also report a correct header. If you're only retrieving a static file, smart web servers (like Apache) do this for you, so you don't need to worry about it. --John ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] AJAX loadIfModified() problems
David, are you loading the if-modified-since header from your target script? ? header(if-modified-since ... something like that WIll I seem to be having some challenges with the loadIfModified(url) function. Is the remote HTML injected if anything is returned by the URL, or if only what is returned that the previous time the URL was queried? I'm building a web page that periodically polls the server to display the status (OK, busy, loading, etc.) The following code does not appear to work (in Firefox 1.5): setInterval(function() { $('#status-container').loadIfModified('status.jsp'); }, 1000); ... however, using the load function instead of loadIfModified does seem to work: setInterval(function() { $('#status-container').load('status.jsp'); }, 1000); Suggestions? ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] $.posting Array of Checkboxes
On Wednesday 06 September 2006 11:00, Rafael Santos wrote: Hey... im trying to post via ajax an array of checkboxes with the same id.. if i do: Well there's the problem right there. Two elements in a page should NEVER have the same ID. That is invalid to start with. If you mean they all have the same NAME, that's OK, although the way you do that correctly varies with the server-side language. -- Larry Garfield AIM: LOLG42 [EMAIL PROTECTED] ICQ: 6817012 If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it. -- Thomas Jefferson ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Thickbox 2.1 Address Book second edition release
This example is written by thickbox 2.1 and used iframe attribute specifically This time I provide package exmaple to downlaod directly. I have a problem. Why I can't use center() in jquery 1.01 ?? ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] IE5 Compatibility
John, is there any news about this plugin? I've tried what has been suggested on the bug tracker (http://liorean.web-graphics.com/scripts/array.js), this script seems to work but jQuery still fails to load. John Resig wrote: Hello - I'm currently planning on spinning off IE 5.0 support into a plugin - that way you'll still be able to use jQuery to your hearts content :-) I have a bug page for it: http://proj.jquery.com/dev/bugs/bug/96/ --John ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Thickbox 2.1 Address Book second edition release url
When I go to edit an item then cancel, the table itself gets loaded into the thickbox. Pretty slick otherwise.BlairOn 9/7/06, TungAlex [EMAIL PROTECTED] wrote:sorry forforget URL. http://www.tweosc.org/article/ajax/thickbox-address-book-second-edition.html___jQuery mailing listdiscuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Autocompleter update
Geoff Knutzen reported 2 bugs having to do with nasty IE transparency issues. Both are fixed now. There is an optional (as yet undocumented) option named zIndex that you should never have to use, unless your page depends heavily on manual zIndex setting. (Geoff, I took your fix and removed the need for the tabIndex by introducing a static counter). On 9/6/06, Dylan Verheul [EMAIL PROTECTED] wrote: Plugin: Autocompleter Url: http://www.dyve.net/jquery?autocomplete Docs: http://www.dyve.net/jquery/autocomplete.txt New options: The options below provide a better user experience (automatically picking results) and advanced markup options (the approach is a little different, but this could be used to duplicate the script.aculo.us demo with pictures in the results). selectFirst (default value: false) If this is set to true, the first autocomplete value will be automatically selected on tab/return, even if it has not been handpicked by keyboard or mouse action. If there is a handpicked (highlighted) result, that result will take precedence. selectOnly (default value: false) If this is set to true, and there is only one autocomplete when the user hits tab/return, it will be selected even if it has not been handpicked by keyboard or mouse action. This overrides selectFirst. formatItem (default value: none) A JavaScript funcion that can provide advanced markup for an item. For each row of results, this function will be called. The returned value will be displayed inside an LI element in the results list. See the source code of http://www.dyve.net/jquery?autocomplete for an example. None of this will break compatibility, you can just use the new js without any changes to your existing code. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/