Re: [jQuery] Broken Build
Why not just force everyone to use UNIX-style endlines (e.g. \n only)? Up until now, that has been the case. To everyone who commits to core: Please watch your endlines, especially in OSX and Windows. --John On 10/8/06, Jörn Zaefferer [EMAIL PROTECTED] wrote: Franck Marcia schrieb: It's not because of the code but because of the data. There are many contributors now, using different OS which means different ways to insert a character when you strike enter :-) In short, the current regexp blockMatch in build/build/lite.js doesn't take '\r' into account. A quick and dirty way to fix the problem is to insert .replace( /\r/g, ) just after readFile(...) and before any other replace. Thanks Franck! I tried your quick and dirty fix for lite: It worked but was awfully slow. To solve the problem, I changed the use of readFile to my own read function, that uses some java classes to replace line ends with a simple \n. At least docs and test build now run again, but lite doesn't, maybe due to limitations of Rhino or due to limitations of my knowledge of Rhino. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] pack speed
Hello, has anyone measured the speed of unpacking jquery (or any other script, for that matter)? I would suspect that uncompressing/executing jquery.pack.js generates a small time overhead, but how long does it take? Compared to the time overhead of downloading the full-size jquery.js? -- Fil ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] pack speed
2006/10/9, Fil [EMAIL PROTECTED]: has anyone measured the speed of unpacking jquery (or any other script, for that matter)? On my system: 125 ms when on battery (laptop), 65 ms when on power. It depends completely on the system it's running on. Franck. I would suspect that uncompressing/executing jquery.pack.js generates a small time overhead, but how long does it take? Compared to the time overhead of downloading the full-size jquery.js? The smallest non-packed version of jQuery is 29 Kb vs. 19 Kb for the packed one (rev #407), so you save 10 Kb. This time, it depends completely on the network it's passing thru. Franck. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jquery update causes js error
Michael Geary schrieb: From: Stephen Woodbridge [EMAIL PROTECTED] http://imaptools.com:8081/maps/demo2.html From: Brent Pedersen i'd guess the offending line is in mscross: Object.prototype.objRef = null; Good catch. It's strictly verboten to add to Object.prototype. That will break all kinds of things, not just jQuery. Totally agreed, but we could still make jQuery more robust: for (propName in obj) { if (obj.hasOwnProperty(propName)) { // do something with property... } } jQuery is supposed to be used with lots of third party code (which propably will extend the object here and there), so maybe we should think about that. -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] pack speed
Hi, has anyone measured the speed of unpacking jquery (or any other script, for that matter)? I would suspect that uncompressing/executing jquery.pack.js generates a small time overhead, but how long does it take? Compared to the time overhead of downloading the full-size jquery.js? It depends on the computers and the network connection you have. If you are developing a inhouse-application which usually can work with 1Gbit ethernet connections, then the uncompressed jQuery is probably faster for most machines. I have not measured, but beginning at least with 10Mbit downwards I'd expect a modern computer to be faster with uncompressing than with transfering the data. If you have very slow machines on the user side, then that border may come down to maybe 1Mbit. In that case you also might want to go through the jQuery-code to make it faster - you pay with reduced readability and ellegance of course. Christof ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] pack speed
has anyone measured the speed of unpacking jquery (or any other script, for that matter)? I would suspect that uncompressing/executing jquery.pack.js generates a small time overhead, but how long does it take? Compared to the time overhead of downloading the full-size jquery.js? It depends on the computers and the network connection you have. If you are developing a inhouse-application which usually can work with 1Gbit ethernet connections, then the uncompressed jQuery is probably faster for most machines. I have not measured, but beginning at least with 10Mbit downwards I'd expect a modern computer to be faster with uncompressing than with transfering the data. If you have very slow machines on the user side, then that border may come down to maybe 1Mbit. In that case you also might want to go through the jQuery-code to make it faster - you pay with reduced readability and ellegance of course. Something else to consider: Once downloaded, the JS file can be cached. But the uncompressing has to be done every time. -- Jörn -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] DOM-Traversing and Text_Nodes
hi all! i wonder how i could do this using jquery's dom-traversing: in IE6 i do: 1. select one word in text with the mouse 2. get selection and create range 3. clone this range twice, collapse one copy to left and the other to right 4. insert span (id='left_boundary) at left, and span (id='right_boundary' at right 5. try $('#left_boundary').next()[0].nodeName, get SPAN - it skips the text but $('#left_boundary')[0].nextSibling.nodeName gives me #TEXT_NODE why cant i use jquery to access TEXT_NODES? or: what can i do to get it working? -- Falk ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery 1.0.2 RC2
Jörn Zaefferer wrote: it's time for another release candiate, this time including even more bug fixes and nothing else. IE 6.0.2900.2180 (XP SP2) - 1 tests of 211 failed: 38. $.find() (1, 42, 43) Firefox 1.5.0.7 - ok (test #55 failed once - but I think this may have been down to a network error) Opera 9.02 - ok ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Cheat Sheet?
FYI: Every single one of those links leads to a 'forbidden' page. Karl Swedberg-2 wrote: On Oct 6, 2006, at 11:41 PM, Rey Bango wrote: I recall a JQuery cheat sheet floating around. Anyone have the link to that? Hi Rey, They came from Nilesh Patel. PDF http://www.define-web.com/jquery_cheat_sheet/ jquery_cheat_sheet_080306_v1.pdf http://www.define-web.com/jquery_cheat_sheet/ jquery_cheat_sheet_080306_v1_pg2.pdf PNG http://www.define-web.com/jquery_cheat_sheet/ jquery_cheat_sheet_080306_v1.png http://www.define-web.com/jquery_cheat_sheet/ jquery_cheat_sheet_080306_v1_pg2.png Cheers, Karl ___ Karl Swedberg www.englishrules.com www.learningjquery.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- View this message in context: http://www.nabble.com/Cheat-Sheet--tf2399270.html#a6714977 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] DOM-Traversing and Text_Nodes
hi all! i wonder how i could do this using jquery's dom-traversing: in IE6 i do: 1. select one word in text with the mouse 2. get selection and create range 3. clone this range twice, collapse one copy to left and the other to right 4. insert span (id='left_boundary) at left, and span (id='right_boundary' at right 5. try $('#left_boundary').next()[0].nodeName, get SPAN - it skips the text but $('#left_boundary')[0].nextSibling.nodeName gives me #TEXT_NODE why cant i use jquery to access TEXT_NODES? or: what can i do to get it working? -- Falk ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Cheat Sheet?
Work fine for me? Did you copy the links into the url rather than click them? Their broken over two lines. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] IE6 performance tweak
Klaus Hartl wrote: The by far safest thing to use is Conditional Compilation. And that way other browsers only get JavaScript comments...: Yeah i saw that on your blog. But doesn't this affect all versions of msie, even 6+ ? -- Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Is there a way to endAll()?
After some find(), filter(), parent(), siblings()..., is there any convenient way to end() back to the original $(xxx)? This would be good for plugins to return the original jQuery object. -- Best Regards, Jacky http://jacky.seezone.net ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Is there a way to endAll()?
@ Jacky [EMAIL PROTECTED] : After some find(), filter(), parent(), siblings()..., is there any convenient way to end() back to the original $(xxx)? This would be good for plugins to return the original jQuery object. I do it this way: $.fn.plugin = function() { this.find().filter().parent().siblings(); return this; } -- Fil ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] ajax login
On Sun, 8 Oct 2006 22:12:17 -0400 TJ [EMAIL PROTECTED] wrote: I have updated to this with the return false. I am still getting the same error. Any suggestions? can you send a link to that page? Your code is working for me (calling register php and browser stays on old location) if i just add html head script type='text/javascript' src='/WHEREVER IT IS/jquery.js'/script /head body YOUR CODE /body /html Besides instaed of the .get(0).value combination you could use .val(), shorter and a bit mor functionality. Thanks! Matthias ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Cheat Sheet?
On Oct 9, 2006, at 6:18 AM, Dan Atkinson wrote: FYI: Every single one of those links leads to a 'forbidden' page. Karl Swedberg-2 wrote: On Oct 6, 2006, at 11:41 PM, Rey Bango wrote: I recall a JQuery cheat sheet floating around. Anyone have the link to that? Hi Rey, They came from Nilesh Patel. PDF http://www.define-web.com/jquery_cheat_sheet/ jquery_cheat_sheet_080306_v1.pdf http://www.define-web.com/jquery_cheat_sheet/ jquery_cheat_sheet_080306_v1_pg2.pdf PNG http://www.define-web.com/jquery_cheat_sheet/ jquery_cheat_sheet_080306_v1.png http://www.define-web.com/jquery_cheat_sheet/ jquery_cheat_sheet_080306_v1_pg2.png Dan, sorry about that. Actually, they work fine if you stitch the first and second lines or the third and fourth lines together (for PDF and for PNG). Looks like my mail client (Apple Mail) chopped the URLs in half, and I'm not sure how to fix that in the Preferences. Karl ___ Karl Swedberg www.englishrules.com www.learningjquery.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Cheat Sheet?
Lol! Oops! I can't believe I didn't see that! Fixed: PDF http://www.define-web.com/jquery_cheat_sheet/jquery_cheat_sheet_080306_v1.pdf http://www.define-web.com/jquery_cheat_sheet/jquery_cheat_sheet_080306_v1_pg2.pdf PNG http://www.define-web.com/jquery_cheat_sheet/jquery_cheat_sheet_080306_v1.png http://www.define-web.com/jquery_cheat_sheet/jquery_cheat_sheet_080306_v1_pg2.png Karl Swedberg-2 wrote: On Oct 9, 2006, at 6:18 AM, Dan Atkinson wrote: FYI: Every single one of those links leads to a 'forbidden' page. Karl Swedberg-2 wrote: On Oct 6, 2006, at 11:41 PM, Rey Bango wrote: I recall a JQuery cheat sheet floating around. Anyone have the link to that? Hi Rey, They came from Nilesh Patel. PDF http://www.define-web.com/jquery_cheat_sheet/ jquery_cheat_sheet_080306_v1.pdf http://www.define-web.com/jquery_cheat_sheet/ jquery_cheat_sheet_080306_v1_pg2.pdf PNG http://www.define-web.com/jquery_cheat_sheet/ jquery_cheat_sheet_080306_v1.png http://www.define-web.com/jquery_cheat_sheet/ jquery_cheat_sheet_080306_v1_pg2.png Dan, sorry about that. Actually, they work fine if you stitch the first and second lines or the third and fourth lines together (for PDF and for PNG). Looks like my mail client (Apple Mail) chopped the URLs in half, and I'm not sure how to fix that in the Preferences. Karl ___ Karl Swedberg www.englishrules.com www.learningjquery.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- View this message in context: http://www.nabble.com/Cheat-Sheet--tf2399270.html#a6717090 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] oninput bug workaround
Hi John, Oninput is a firefox event, it fires whenever the text being displayed would change, e.g. after a paste (so it's similar to the IE event onpaste). Onkeypress won't catch right-click pastes or auto- completion, and I believe that onchange doesn't fire until the field loses focus. Anyway, it's not really a jQuery problem, there is a bug filed for it (since it clearly doesn't function even when used directly). I was just hoping there might be a jQuery way to implement the workaround to avoid dragging in other libraries that aren't otherwise needed. Regards, Duncan On 09/10/2006, at 5:03 PM, John Resig wrote: I can safely say that I've never heard of the 'input' event. Nor has Quicksmode: http://www.quirksmode.org/js/events_compinfo.html Perhaps you meant something else? (onkeypress? onchange?) --John On 10/9/06, Duncan Anker [EMAIL PROTECTED] wrote: I've been trying to use oninput to validate fields in firefox and have had zero luck with it the jQuery way: element.bind('input', ...) is just not cutting it. After some digging around on the net I *finally* found some useful, although mildly depressing, information about it. What it seems to boil down to is a bug in firefox (and mozilla codebase in general I expect). This is okay: input oninput=... So is this: element.addEventListener('input', ...) This doesn't work: element.oninput = function() { ... So I'm figuring that jQuery must perform its cross-platform magic using the latter form. Does anyone have any ideas about how to handle this? I want to stay unobtrusive, so I don't want the handlers defined in my HTML, and I want to be cross-platform, and I'd rather not implement a cross-platform event handler just for the one event, especially since there is already one in jQuery. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] IE6 performance tweak
Webunity | Gilles van den Hoven schrieb: Klaus Hartl wrote: The by far safest thing to use is Conditional Compilation. And that way other browsers only get JavaScript comments...: Yeah i saw that on your blog. But doesn't this affect all versions of msie, even 6+ ? Yes, but that does jQuery.browser.msie as well. If I want to exclude IE7 I perform the following check: /[EMAIL PROTECTED] if (typeof XmlHttpRequest == 'function') document.execCommand(BackgroundImageCache, false, true); @*/ That assumes jQuery's Ajax module. Maybe you could use the variable @_jscript_version to make the distinction (it's 5.6 in IE6 and 5.7 in IE7), but I'm not sure if that ever changes with a possible update for IE6: /[EMAIL PROTECTED] if (parseFloat(@_jscript_version) 5.7) document.execCommand(BackgroundImageCache, false, true); @*/ -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Is there a way to endAll()?
I do it this way: $.fn.plugin = function() { this.find().filter().parent().siblings(); return this; } That would return the modified jQuery object. Oh my goddess! Thanks for correcting this :-/ I need to proof my code now... -- Fil ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] oninput bug workaround
On 09/10/06, Duncan Anker [EMAIL PROTECTED] wrote: Hi John, Oninput is a firefox event, it fires whenever the text being displayed would change, e.g. after a paste (so it's similar to the IE event onpaste). Onkeypress won't catch right-click pastes or auto- completion, and I believe that onchange doesn't fire until the field loses focus. Anyway, it's not really a jQuery problem, there is a bug filed for it (since it clearly doesn't function even when used directly). I was just hoping there might be a jQuery way to implement the workaround to avoid dragging in other libraries that aren't otherwise needed. Regards, Duncan oninput doesn't seem to be documented by Mozilla. The only thing I can find is to do with XUL. As it isn't documented for the HTML DOM, there is a chance it may be dropped in the future. http://developer.mozilla.org/en/docs/Special:Search?search=oninputgo=Go ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Stopping animate() on command
Hi there,I'm currently searching for a good solution to stop jQuery's interal function animate() when a new event occurs. A very basic example:1. You have a moving div container which has a duration of 10 seconds, it moves from left: 0px; to left: 500px. 2. Somewhere in your page there's a stop button, if you press it, the animation will end before duration has ended.I need it for a special case where I start a animation using a click, and if I click again, the new animation should begin right away and the old one cleared. Any ideas?-- Paul BakausWeb DeveloperHildastr. 3579102 Freiburg ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jquery update causes js error
Michael and Brent, Thank you very much! That was it. Any idea why that would have been done in the first place? I ran into another issue that all my for loops in code I added to mscross were returning a null objRef at the end of the loop and I had to add code to detect that and break out of the loop. This is all a little new to me and I'm still learning. jQuery rocks and so does this list. I've learned a lot in one day of lurking on the list. Thanks again, -Steve Michael Geary wrote: From: Stephen Woodbridge [EMAIL PROTECTED] http://imaptools.com:8081/maps/demo2.html From: Brent Pedersen i'd guess the offending line is in mscross: Object.prototype.objRef = null; Good catch. It's strictly verboten to add to Object.prototype. That will break all kinds of things, not just jQuery. From a quick glance at the code, it would appear that the assignment isn't even necessary. You could remove that line and I'll bet it won't affect the operation of the mscross library at all. -Mike ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jquery update causes js error
Stephen Woodbridge schrieb: Michael and Brent, Thank you very much! That was it. Any idea why that would have been done in the first place? I ran into another issue that all my for loops in code I added to mscross were returning a null objRef at the end of the loop and I had to add code to detect that and break out of the loop. This is all a little new to me and I'm still learning. Stephen, as I wrote in the other post, to avoid these problems, you should use these loops like this: for (propName in obj) { if (obj.hasOwnProperty(propName)) { // do something with property... } } -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Is there a way to endAll()?
To savely restore the state, you could do something like this (untested): jQuery.fn.plugin = function() { var oldStack = $.merge( [], this.stack ); // do other stuff this.stack = oldStack; return this; }; By merging the current stack into an empty array, a copy of the current stack is created, which can then be used to restore the stack. Another solution: jQuery.fn.plugin = function() { var oldState = $(this); // do other stuff; return oldState; }; This would return the same state, but a different object. If your code has a refernce to the jQuery object before the plugin is called, the reference would point to a different object then the one that is returned by the plugin. -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] IE6 performance tweak
On 09/10/06, Klaus Hartl [EMAIL PROTECTED] wrote: Webunity | Gilles van den Hoven schrieb: Klaus Hartl wrote: The by far safest thing to use is Conditional Compilation. And that way other browsers only get JavaScript comments...: Yeah i saw that on your blog. But doesn't this affect all versions of msie, even 6+ ? Yes, but that does jQuery.browser.msie as well. If I want to exclude IE7 I perform the following check: /[EMAIL PROTECTED] if (typeof XmlHttpRequest == 'function') document.execCommand(BackgroundImageCache, false, true); @*/ That assumes jQuery's Ajax module. Maybe you could use the variable @_jscript_version to make the distinction (it's 5.6 in IE6 and 5.7 in IE7), but I'm not sure if that ever changes with a possible update for IE6: /[EMAIL PROTECTED] if (parseFloat(@_jscript_version) 5.7) document.execCommand(BackgroundImageCache, false, true); @*/ -- Klaus I think, if possible, the browser detection should check browsers through something other than the user agent. // Figure out what browser is being used jQuery.browser = { safari: /webkit/.test(b), opera: !!window.opera, msie: /[EMAIL PROTECTED] /[EMAIL PROTECTED] (@_jscript) true @else @*/ false /[EMAIL PROTECTED] @*/ mozilla: !!window.Components }; This assumes no one creates an object called 'opera' or 'Comnponents' on the window object. I'm not sure what is unique in Safari as I can't find any pages on Apple detailing the DOM in Safari. Not friendly with Dean Edwards' packer tool though, which won't be able to compress any code that uses conditional comments without breaking it. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jquery update causes js error
it looks like mscross had objRef to maintain the scope he wanted. (though he didn't need to extend Object.prototype). in jquery when you attach an event, this in a callback refers to the html element that was clicked or mouseover-ed etc. in his lib, he is saving a reference to an html element in objRef, which he uses later to set the scope. another way would be to use .apply/.call or just use jquery. -bOn 10/9/06, Klaus Hartl [EMAIL PROTECTED] wrote: Stephen Woodbridge schrieb: Michael and Brent, Thank you very much! That was it. Any idea why that would have been done in the first place? I ran into another issue that all my for loops in code I added to mscross were returning a null objRef at the end of the loop and I had to add code to detect that and break out of the loop. This is all a little new to me and I'm still learning.Stephen, as I wrote in the other post, to avoid these problems, you should use these loops like this:for (propName in obj) {if (obj.hasOwnProperty(propName)) {// do something with property...}}-- Klaus___ jQuery mailing listdiscuss@jquery.comhttp://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Effect similar to this blog's exploding window
Jack Slocum was discussing a new block comments feature that he added into his blog. http://www.jackslocum.com/yui/2006/10/09/my-wordpress-comments-system-built-with-yahoo-ui-and-yahooext/ The feature is pretty cool but what I found even cooler was how the comment window kind of exploded onto the screen. Is there a way to duplicate that effect via JQuery (maybe with Interface)? Rey ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] jQuery Browser Detection
Currently, jQuery does a browser detect by checking the user agent. However, I think object detection would probably be a better way. This code does that by detecting unique obects on the window object. However, I am not sure what is unique to Safari. // Figure out what browser is being used jQuery.browser = { safari: /webkit/.test(b), opera: !!window.opera !!window.opera.defineMagicFunction, msie: !!window.clipboardData, mozilla: !!window.XPCNativeWrapper }; The chance of someone defining 'window.opera.defineMagicFunction', window.clipboardData' and 'window.XPCNativeWrapper' is virtually non existent (far far less likely than someone changing the user agent string). defineMagicFunction (http://www.opera.com/support/tutorials/userjs/specs/) is used by user scripts on Opera, clipboardData (http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/clipboarddata.asp) is for working with the clipboard and XPCNativeWrapper (http://kb.mozillazine.org/XPCNativeWrapper) is used by privileged code (i.e. extensions) to access unprivileged code (i.e. content on a webpage) in a secure way. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Effect similar to this blog's exploding window
Rey Bango wrote: Jack Slocum was discussing a new block comments feature that he added into his blog. http://www.jackslocum.com/yui/2006/10/09/my-wordpress-comments-system-built-with-yahoo-ui-and-yahooext/ The feature is pretty cool but what I found even cooler was how the comment window kind of exploded onto the screen. Is there a way to duplicate that effect via JQuery (maybe with Interface)? Rey ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ Yes, you can use Interface http://interface.eyecon.ro/demos/ifxtransferto2.html . Sorry to say that I found a bug in FX transferto, but I fix it and I will upload the changes today. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Performance question
Thanks for all your responses. I actually do all the things that you mentioned: reusing the jQ object, chaining, setting a context, etc. Actually it would be helpful to have some performance analysis on the different kinds of queries, such as searching by ID, by element, class name, attribute, xpath queries, context-delimited, etc., because even though it's somewhat straightforward to know that a search by ID is faster than searching by class name, it'd be interesting (and useful)to know by how much. On 10/7/06, Matt Stith [EMAIL PROTECTED] wrote: yes, that would help quite a bit, since jquery would only need to look once.On 10/7/06, Jacky [EMAIL PROTECTED] wrote: Would caching the jQuery object a help too? Sometimes you just can't keep the chain. e.g. var jqObj = $(#abc); On 10/8/06, Karl Swedberg [EMAIL PROTECTED] wrote: On Oct 7, 2006, at 3:39 PM, George Adamson wrote:An easy performance booster is to use the second param in $() to set a context for the search. Eg: $(DIV.myClass, myParentElement). Perhaps this is what you meant when you mentioned 'getting a parent element' ? Chaining methods is helpful so you can avoid re-querying. If you need to put other code in betwen method calls then reusing the same JQuery object by putting it into a variable beforehand is worth while to save requerying. If you're going to do several queries inside the same parent element (s) then a combination of the above will be a big help. Those sound like good suggestions to me, though I'm no expert. Something I try to keep in mind is the relative speed of different types of queries. This has been mentioned on the list before, but in case you didn't see it, references to IDs are fastest, followed by elements, and then classes. At least, that's how I've understood previous discussions of the topic. So: a.$('#my-id') is faster than $('div#my-id'), and b. $('div.my-class') is faster than $('.my-class') Hop that helps. Karl ___ Karl Swedberg www.englishrules.com www.learningjquery.com___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Best Regards, Jacky 網絡暴民 http://jacky.seezone.net ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___jQuery mailing listdiscuss@jquery.comhttp://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Effect similar to this blog's exploding window
Thank you Stefan. I'll check that out. Rey Stefan Petre wrote: Rey Bango wrote: Jack Slocum was discussing a new block comments feature that he added into his blog. http://www.jackslocum.com/yui/2006/10/09/my-wordpress-comments-system-built-with-yahoo-ui-and-yahooext/ The feature is pretty cool but what I found even cooler was how the comment window kind of exploded onto the screen. Is there a way to duplicate that effect via JQuery (maybe with Interface)? Rey ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ Yes, you can use Interface http://interface.eyecon.ro/demos/ifxtransferto2.html . Sorry to say that I found a bug in FX transferto, but I fix it and I will upload the changes today. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Queueing of effects (fx)
Hi guys, I was searching if there was a way to do queuing like in script.aculo.us (I am switching to jquery but this is the only bump) Here some doc's on how it works in script.aculo.us http://blog.railsdevelopment.com/pages/effect/queue/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Queueing of effects (fx)
On 09/10/06, Abdur-Rahman Advany [EMAIL PROTECTED] wrote: Hi guys, I was searching if there was a way to do queuing like in script.aculo.us (I am switching to jquery but this is the only bump) Here some doc's on how it works in script.aculo.us http://blog.railsdevelopment.com/pages/effect/queue/ Have you tried using callbacks? they are fired whenever an effect finishes. $(#mydiv).fadeOut(slow, function() { $(#mydiv2).fadeIn(slow); }) ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] New Plugin: Xpander
I've just added a new plugin, in its early stages, that will display standard links as inline toggling divs. http://jquery.com/docs/Plugins/Xpander/ I'm still new to this process, so any comments/feedback would be appreciated. Thanks ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery Browser Detection
I'm inclined to disagree. I believe that one should use object detection for cases in which they are invoking that object for it's functionality. A prime example is the XHR (although MS may be messing around with that in IE7). But, if one is best served by simply knowing what browser we are dealing with, one should absolutely use the user agent string. It's where the browser vendor *tells you* what browser it is. Why hack around, when the vendor is telling you what you need to know? For example: you need to apply a hack to get around one of IE6's infamous layout bugs, when dealing with a dynamic web application. Are you going to test for XHR or window.clipboardData? No, you ask the browser what browser it is. If it's IE6, (or IE 5.5 if the bug is there, too), code for that instance. We should avoid being obtuse in our code. Summary: 1. Use object detection to detect objects, when you don't have to care what browser you're using, as long at the object exists and will do what you want it to. 2. Use the user agent string when you're more interested in what browser you're actually using (by name) than you are in whether or not that browser has a specific object available. - Brian Currently, jQuery does a browser detect by checking the user agent. However, I think object detection would probably be a better way. This code does that by detecting unique obects on the window object. However, I am not sure what is unique to Safari. // Figure out what browser is being used jQuery.browser = { safari: /webkit/.test(b), opera: !!window.opera !!window.opera.defineMagicFunction, msie: !!window.clipboardData, mozilla: !!window.XPCNativeWrapper }; The chance of someone defining 'window.opera.defineMagicFunction', window.clipboardData' and 'window.XPCNativeWrapper' is virtually non existent (far far less likely than someone changing the user agent string). defineMagicFunction (http://www.opera.com/support/tutorials/userjs/specs/) is used by user scripts on Opera, clipboardData (http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/clipboarddata.asp) is for working with the clipboard and XPCNativeWrapper (http://kb.mozillazine.org/XPCNativeWrapper) is used by privileged code (i.e. extensions) to access unprivileged code (i.e. content on a webpage) in a secure way. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery Browser Detection
On 09/10/06, Brian Miller [EMAIL PROTECTED] wrote: I'm inclined to disagree. I believe that one should use object detection for cases in which they are invoking that object for it's functionality. A prime example is the XHR (although MS may be messing around with that in IE7). But, if one is best served by simply knowing what browser we are dealing with, one should absolutely use the user agent string. It's where the browser vendor *tells you* what browser it is. Why hack around, when the vendor is telling you what you need to know? For example: you need to apply a hack to get around one of IE6's infamous layout bugs, when dealing with a dynamic web application. Are you going to test for XHR or window.clipboardData? No, you ask the browser what browser it is. If it's IE6, (or IE 5.5 if the bug is there, too), code for that instance. We should avoid being obtuse in our code. Summary: 1. Use object detection to detect objects, when you don't have to care what browser you're using, as long at the object exists and will do what you want it to. 2. Use the user agent string when you're more interested in what browser you're actually using (by name) than you are in whether or not that browser has a specific object available. - Brian So what do you do in the case when the user agent string has been changed (all browser vendors allow it to be changed)? I just don't completely trust what the user agent string returns. I am testing for objects, but these objects are unique to each browser. You could say it is abusing the objects (i.e. not using them for what they are intended for). There is no foolproof solution to browser detection though. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Stopping animate() on command
Paul Bakaus wrote: Hi there, I'm currently searching for a good solution to stop jQuery's interal function animate() when a new event occurs. A very basic example: 1. You have a moving div container which has a duration of 10 seconds, it moves from left: 0px; to left: 500px. 2. Somewhere in your page there's a "stop" button, if you press it, the animation will end before duration has ended. I need it for a special case where I start a animation using a click, and if I click again, the new animation should begin right away and the old one cleared. Any ideas? -- Paul Bakaus Web Developer Hildastr. 35 79102 Freiburg ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ Yeah, I faced a lot of situations where I needed some control over events. I even open a ticket on this issue. I would like something like end current queued effect, pause effect, dequeue the rest of events. Maybe ending effect with some option, go to last step, go to first step etc. I faced the problem on fisheye menu and tooltips. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Queueing of effects (fx)
I could be wrong, but I'm pretty sure fx are automatically queued. Something John did about 2 months ago. There's not a commit log for the actual queuing, but there is one for a bug fix: r209 | john | 2006-08-16 19:38:34 -0700 (Wed, 16 Aug 2006) | 2 lines Changed paths: M /jquery/src/fx/fx.js Fixed the issue with queued effects becoming corrupted. Corey On Oct 9, 2006, at 9:13 AM, Abdur-Rahman Advany wrote: Sam, Yeh, but using queue's allows that events don't fire a fx during some other fx... I can't do that with callbacks... Sam Collett wrote: On 09/10/06, Abdur-Rahman Advany [EMAIL PROTECTED] wrote: Hi guys, I was searching if there was a way to do queuing like in script.aculo.us (I am switching to jquery but this is the only bump) Here some doc's on how it works in script.aculo.us http://blog.railsdevelopment.com/pages/effect/queue/ Have you tried using callbacks? they are fired whenever an effect finishes. $(#mydiv).fadeOut(slow, function() { $(#mydiv2).fadeIn(slow); }) ___ 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] New Plugin: Xpander
Jeffrey McClure schrieb: I've just added a new plugin, in its early stages, that will display standard links as inline toggling divs. http://jquery.com/docs/Plugins/Xpander/ I'm still new to this process, so any comments/feedback would be appreciated. Thanks Jeffrey, thanks for the plugin! A demo page would be nice, so that one does not have to build it just to have a look. Or maybe I simply missed it? -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery Browser Detection
People that know how to change their user agent string will most likely know the possible results of doing so. I don't buy into the notion that we have lots of people changing their user agent string. -- Brandon Aaron On 10/9/06, Sam Collett [EMAIL PROTECTED] wrote: On 09/10/06, Brian Miller [EMAIL PROTECTED] wrote: I'm inclined to disagree. I believe that one should use object detection for cases in which they are invoking that object for it's functionality. A prime example is the XHR (although MS may be messing around with that in IE7). But, if one is best served by simply knowing what browser we are dealing with, one should absolutely use the user agent string. It's where the browser vendor *tells you* what browser it is. Why hack around, when the vendor is telling you what you need to know? For example: you need to apply a hack to get around one of IE6's infamous layout bugs, when dealing with a dynamic web application. Are you going to test for XHR or window.clipboardData? No, you ask the browser what browser it is. If it's IE6, (or IE 5.5 if the bug is there, too), code for that instance. We should avoid being obtuse in our code. Summary: 1. Use object detection to detect objects, when you don't have to care what browser you're using, as long at the object exists and will do what you want it to. 2. Use the user agent string when you're more interested in what browser you're actually using (by name) than you are in whether or not that browser has a specific object available. - Brian So what do you do in the case when the user agent string has been changed (all browser vendors allow it to be changed)? I just don't completely trust what the user agent string returns. I am testing for objects, but these objects are unique to each browser. You could say it is abusing the objects (i.e. not using them for what they are intended for). There is no foolproof solution to browser detection though. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New Plugin: Xpander
Do you have a demo? One thing to point out is that, if I understand you correctly, this is something that CSS (3 I think) is already capable of doing. !//--andy matthewsweb developercertified advanced coldfusion programmerICGLink, Inc.[EMAIL PROTECTED]615.370.1530 x737--//- -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Jeffrey McClureSent: Monday, October 09, 2006 11:11 AMTo: discuss@jquery.comSubject: [jQuery] New Plugin: XpanderI've just added a new plugin, in its early stages, that will display standard links as inline toggling divs.http://jquery.com/docs/Plugins/Xpander/I'm still new to this process, so any comments/feedback would be appreciated. Thanks ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery Browser Detection
Sam, if that's a problem with your user base, then there are issues that go beyond the technical. If my users were that hackish and black-hatted, I wouldn't be giving them any front-end code at all if I could avoid it. I mean, if people are technically savvy enough to change their user agent string, what stops them from overriding the functions that you provide, as well? I say, we split the difference. Leave jquery's browser detection as is, and offer jUntrustworthy as a plugin, which overrides the original implementation with one that uses object detection. - Brian On 09/10/06, Brian Miller [EMAIL PROTECTED] wrote: I'm inclined to disagree. I believe that one should use object detection for cases in which they are invoking that object for it's functionality. A prime example is the XHR (although MS may be messing around with that in IE7). But, if one is best served by simply knowing what browser we are dealing with, one should absolutely use the user agent string. It's where the browser vendor *tells you* what browser it is. Why hack around, when the vendor is telling you what you need to know? For example: you need to apply a hack to get around one of IE6's infamous layout bugs, when dealing with a dynamic web application. Are you going to test for XHR or window.clipboardData? No, you ask the browser what browser it is. If it's IE6, (or IE 5.5 if the bug is there, too), code for that instance. We should avoid being obtuse in our code. Summary: 1. Use object detection to detect objects, when you don't have to care what browser you're using, as long at the object exists and will do what you want it to. 2. Use the user agent string when you're more interested in what browser you're actually using (by name) than you are in whether or not that browser has a specific object available. - Brian So what do you do in the case when the user agent string has been changed (all browser vendors allow it to be changed)? I just don't completely trust what the user agent string returns. I am testing for objects, but these objects are unique to each browser. You could say it is abusing the objects (i.e. not using them for what they are intended for). There is no foolproof solution to browser detection though. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] NEWS: JQuery and ColdFusion
Some of you may not know about Adobe ColdFusion but its an application server thats been out for some time now and its a very effective product for developing dynamic websites. Its the product that I use and I've been evangelizing JQuery to the CF community as much as possible. One of the notable CF gurus also happens to be the editor of the Ajax Developer's Journal published by Sys-Con Media and he's also a close associate. I've been telling him to take a serious look at JQuery for some time and he finally did. Here's his view: http://www.robgonda.com/blog/index.cfm/2006/10/9/modelglue-jquery-Ajax-contact-manager I especially liked this paragraph: I was truly amazed on how easy it was, and 20 of those minutes were to realize that I needed a plugin for my form serialization. I probably changed no more than 5 lines of code, and removed about 10 more. Rey... ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] How to implement file upload using AJAX?
Hi, Does anybody know how a file pload using AJAX can be implemented in JQuery? If so, please give me an example. I intend to use PHP for the data receiving, but the problem is the sending actually. Thanks in advance Emilian -- View this message in context: http://www.nabble.com/How-to-implement-file-upload-using-AJAX--tf2408953.html#a6714606 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] check all functions
Sam Collett wrote: On 05/10/06, Charles Peterson [EMAIL PROTECTED] wrote: Ya, you inspired my improvement on the functions. basically you are checking or unchecking ALL but ignored checkboxes on the page/form (useful, but not what I wanted) I wanted to specify which ones to check, $.checkallCheckboxClickEvent('.MyCheckAllClass','.CheckTheseClass'); and which ones to click to execute the checkall. This way I have a table with checkboxes to select rows with a check all checkbox at the top and bottom of the table, the script checks/unchecks based on the state of the checkall checkboxes and also updates the checkall checkboxes to be in the same state. basically I didn't want to specify which ones to ignore. Don't know why I didn't think of that. What I may do in future is something like this: var foobar = { include: .foo,.bar } // only .foo and .bar $(#myform).toggleCheckboxes(foobar); var nobaz = { exclude: .baz } // exclude .baz $(#myform).toggleCheckboxes(nobaz); ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ Excellent idea! This would allow more flexibility in your script. Mine also checks and unchecks the controller checkboxes, but that assumes the use of checkboxes to start the event. Let us know if you do that! ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] DOM-Traversing and Text_Nodes
why cant i use jquery to access TEXT_NODES? or: what can i do to get it working? This is correct - jQuery does not deal with Text Nodes (in that it completely ignores them, along with all other non-Element Nodes). Although, having dealt with text operations in a browser before (incredibly painful, to say the least) - there definitely needs to be some sort of library for it. --John ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Queueing of effects (fx)
I believe that jQuery has a sort of built in queue in that effects are chainable. So you'd simply write all of the effects in one long chain and each of them would happen in the order you specify in your chain. !//-- andy matthews web developer certified advanced coldfusion programmer ICGLink, Inc. [EMAIL PROTECTED] 615.370.1530 x737 --//- -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Abdur-Rahman Advany Sent: Monday, October 09, 2006 10:51 AM To: discuss@jquery.com Subject: [jQuery] Queueing of effects (fx) Hi guys, I was searching if there was a way to do queuing like in script.aculo.us (I am switching to jquery but this is the only bump) Here some doc's on how it works in script.aculo.us http://blog.railsdevelopment.com/pages/effect/queue/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New Plugin: Xpander
Here is a demo of the plugin in action:Example:http://labs.activespotlight.net/jQuery/Xpander.htmlPlugin Source: http://labs.activespotlight.net/resources/js/Xpander.jsOverview Page:http://jquery.com/docs/Plugins/Xpander/---Jeffrey ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] How to implement file upload using AJAX?
You can't use ajax to send files. It's not supported because it's not permitted. The libraries that do it (e.g. Yahoo UI) create a hidden iframe on the fly, with a form inside the iframe (that has a file upload control), which gets submitted. It's as much of a pain as it sounds like it is. Other efforts use Flash or a Java applet to help. That said, it's possible that someone can put together a plugin that implements the iframe hack. - Brian Hi, Does anybody know how a file pload using AJAX can be implemented in JQuery? If so, please give me an example. I intend to use PHP for the data receiving, but the problem is the sending actually. Thanks in advance Emilian -- View this message in context: http://www.nabble.com/How-to-implement-file-upload-using-AJAX--tf2408953.html#a6714606 Sent from the JQuery mailing list archive 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] NEWS: JQuery and ColdFusion
I'm trying to convince him of that and I think this exercise may have helped quite a bit. Keep your fingers crossed! :) Rey Andy Matthews wrote: Cool Rey. Maybe Rob will start using jQuery instead of AJAXCFC. Wouldn't that be a kicker! !//-- andy matthews web developer certified advanced coldfusion programmer ICGLink, Inc. [EMAIL PROTECTED] 615.370.1530 x737 --//- -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Rey Bango Sent: Monday, October 09, 2006 12:10 PM To: jQuery Discussion. Subject: [jQuery] NEWS: JQuery and ColdFusion Some of you may not know about Adobe ColdFusion but its an application server thats been out for some time now and its a very effective product for developing dynamic websites. Its the product that I use and I've been evangelizing JQuery to the CF community as much as possible. One of the notable CF gurus also happens to be the editor of the Ajax Developer's Journal published by Sys-Con Media and he's also a close associate. I've been telling him to take a serious look at JQuery for some time and he finally did. Here's his view: http://www.robgonda.com/blog/index.cfm/2006/10/9/modelglue-jquery-Ajax-conta ct-manager I especially liked this paragraph: I was truly amazed on how easy it was, and 20 of those minutes were to realize that I needed a plugin for my form serialization. I probably changed no more than 5 lines of code, and removed about 10 more. Rey... ___ 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] jQuery Browser Detection
Brian. Aren't there cases though where the browser tells you the incorrect string? For example, I believe that older versions of IE for Mac said that they were actually a different browser than they really were. The AOL browser also does this same thing I think. !//-- andy matthews web developer certified advanced coldfusion programmer ICGLink, Inc. [EMAIL PROTECTED] 615.370.1530 x737 --//- -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Brian Miller Sent: Monday, October 09, 2006 11:12 AM To: jQuery Discussion. Subject: Re: [jQuery] jQuery Browser Detection I'm inclined to disagree. I believe that one should use object detection for cases in which they are invoking that object for it's functionality. A prime example is the XHR (although MS may be messing around with that in IE7). But, if one is best served by simply knowing what browser we are dealing with, one should absolutely use the user agent string. It's where the browser vendor *tells you* what browser it is. Why hack around, when the vendor is telling you what you need to know? For example: you need to apply a hack to get around one of IE6's infamous layout bugs, when dealing with a dynamic web application. Are you going to test for XHR or window.clipboardData? No, you ask the browser what browser it is. If it's IE6, (or IE 5.5 if the bug is there, too), code for that instance. We should avoid being obtuse in our code. Summary: 1. Use object detection to detect objects, when you don't have to care what browser you're using, as long at the object exists and will do what you want it to. 2. Use the user agent string when you're more interested in what browser you're actually using (by name) than you are in whether or not that browser has a specific object available. - Brian Currently, jQuery does a browser detect by checking the user agent. However, I think object detection would probably be a better way. This code does that by detecting unique obects on the window object. However, I am not sure what is unique to Safari. // Figure out what browser is being used jQuery.browser = { safari: /webkit/.test(b), opera: !!window.opera !!window.opera.defineMagicFunction, msie: !!window.clipboardData, mozilla: !!window.XPCNativeWrapper }; The chance of someone defining 'window.opera.defineMagicFunction', window.clipboardData' and 'window.XPCNativeWrapper' is virtually non existent (far far less likely than someone changing the user agent string). defineMagicFunction (http://www.opera.com/support/tutorials/userjs/specs/) is used by user scripts on Opera, clipboardData (http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/clipboard data.asp) is for working with the clipboard and XPCNativeWrapper (http://kb.mozillazine.org/XPCNativeWrapper) is used by privileged code (i.e. extensions) to access unprivileged code (i.e. content on a webpage) in a secure way. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New Plugin: Xpander
Very cool Jeffrey. Rey Jeffrey McClure wrote: Here is a demo of the plugin in action: Example: http://labs.activespotlight.net/jQuery/Xpander.html Plugin Source: http://labs.activespotlight.net/resources/js/Xpander.js Overview Page: http://jquery.com/docs/Plugins/Xpander/ --- Jeffrey ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] String concatenation optimization
i like to mess around with javascript optimization lately. i wrote this little page to show the different speeds of string concatenation code. i tested in firefox and IE7. just looking for any feedback or suggestions. thx http://www21.brinkster.com/tomhere/test/test36.htm -- View this message in context: http://www.nabble.com/String-concatenation-optimization-tf2411788.html#a6722790 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery Browser Detection
Aren't there cases though where the browser tells you the incorrect string? For example, I believe that older versions of IE for Mac said that they were actually a different browser than they really were. The AOL browser also does this same thing I think. Fortunately, neither of those browsers are ones that jQuery supports, so it's something of a moot point. The only piece of the puzzle left is to detect if a browser is capable of running jQuery or not - which would probably be done using object detection. --John ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Queueing of effects (fx)
I believe that jQuery has a sort of built in queue in that effects are chainable. So you'd simply write all of the effects in one long chain and each of them would happen in the order you specify in your chain. Exactly, so doing: $(#foo).slideDown('slow').slideUp('slow'); will be queued completely. --John ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] How to integrate jquery with java
Hi, what is the preferred way to integrate jquery with java? I am planning on using DWR - so I can make calls to my backend - handle moving data from java to javascript, vice versa Just curious what are other using? Thanks ___ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New Plugin: Xpander
Ooooh. That's TOTALLY not what I was thinking. Very cool. !//--andy matthewsweb developercertified advanced coldfusion programmerICGLink, Inc.[EMAIL PROTECTED]615.370.1530 x737--//- -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Jeffrey McClureSent: Monday, October 09, 2006 12:53 PMTo: discuss@jquery.comSubject: Re: [jQuery] New Plugin: XpanderHere is a demo of the plugin in action:Example:http://labs.activespotlight.net/jQuery/Xpander.htmlPlugin Source:http://labs.activespotlight.net/resources/js/Xpander.jsOverview Page:http://jquery.com/docs/Plugins/Xpander/---Jeffrey ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] IE7 May be Pushed out Tomorrow
If you don't want to upgrade, be very vigilant about what automatic updates you install during MS' normal patch cycle: http://blog.washingtonpost.com/securityfix/2006/10/microsoft_to_push_out_internet.html Rey... ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] IE7 May be Pushed out Tomorrow
Rey Bango wrote: If you don't want to upgrade, be very vigilant about what automatic updates you install during MS' normal patch cycle: Does anybody know if it is possible to run both IE 6.x and IE7 both on thesame system? An absolute must if you are a web developer... Thanx Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] IE7 May be Pushed out Tomorrow
i dont think its a good idea for ms to force ie7 automatically, thats a big change and would REALLY confuse the average IE user... On 10/9/06, Rey Bango [EMAIL PROTECTED] wrote: If you don't want to upgrade, be very vigilant about what automatic updates you install during MS' normal patch cycle: http://blog.washingtonpost.com/securityfix/2006/10/microsoft_to_push_out_internet.html Rey... ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] IE7 May be Pushed out Tomorrow
Webunity | Gilles van den Hoven schrieb: Does anybody know if it is possible to run both IE 6.x and IE7 both on thesame system? An absolute must if you are a web developer... Try this: http://tredosoft.com/IE7_standalone Works good enough for me. -- Jörn ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] String concatenation optimization
Tombo wrote: i like to mess around with javascript optimization lately. i wrote this little page to show the different speeds of string concatenation code. i tested in firefox and IE7. just looking for any feedback or suggestions. thx http://www21.brinkster.com/tomhere/test/test36.htm This seems contrary to your results. Maybe your test is too trivial a case to be a good generalization. http://www.softwaresecretweapons.com/jspwiki/Wiki.jsp?page=JavascriptStringConcatenation ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] IE7 May be Pushed out Tomorrow
2006/10/9, Franck Marcia [EMAIL PROTECTED]: 2006/10/9, Jörn Zaefferer [EMAIL PROTECTED]: thesame system? An absolute must if you are a web developer... Try this: http://tredosoft.com/IE7_standalone ... and the opposite: ie3 to ie6, standalone. Franck. ... and the link: Forgot the link: http://browsers.evolt.org/?ie/32bit/standalone Franck. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] IE7 May be Pushed out Tomorrow
Try this: http://tredosoft.com/IE7_standalone Works good enough for me. Thanx, just downloaded it! ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New plugin: sparkline
2006/10/9, dizzledorf [EMAIL PROTECTED]: Nice work, Franck. Thank you. How do I get the sparklines to work with negative values? I plan to integrate it soon. Franck. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] IE7 May be Pushed out Tomorrow
Franck Marcia schrieb: 2006/10/9, Jörn Zaefferer [EMAIL PROTECTED]: thesame system? An absolute must if you are a web developer... Try this: http://tredosoft.com/IE7_standalone ... and the opposite: ie3 to ie6, standalone. Wow Franck, you are still testing in IE3? ;-) --Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jquery update causes js error
Thank you very much! That was it. [Object.prototype.objRef = null;] Any idea why that would have been done in the first place? Probably because the person who wrote that code didn't know any better! I ran into another issue that all my for loops in code I added to mscross were returning a null objRef at the end of the loop and I had to add code to detect that and break out of the loop. This is all a little new to me and I'm still learning. Yes, that is the same problem that broke jQuery. The Object.prototype.objRef = null; assignment adds an objRef property to *every* object. Stephen, as I wrote in the other post, to avoid these problems, you should use these loops like this: for (propName in obj) { if (obj.hasOwnProperty(propName)) { // do something with property... } } But not every browser supports hasOwnProperty. Safari doesn't. Does IE 5.5? In the Object.prototype is verboten article someone posted a comment with code to implement object.hasOwnProperty, but the code isn't exactly speedy. (And it has one bug - it should use === for the comparison instead of ==.) I wouldn't be too keen on adding this overhead to jQuery or my own code. -Mike ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] IE7 and document.ready
Hi Guys, Just found another document.ready bug at least i hope it is a bug :) The document.ready is not firing in IE7 when loading content via ajax into a DIV. Is this a common problem which is allready known? Someone might have a fix for this? The current scenario fires succesfully in both firefox and IE6 just like i want it to be and is like this: - I load some _javascript_s in the header of the page, in those headers are document.readys - When i load new data into a div, i want the document.readys to fire again, since they do some jQuery magic As said, this scenario successfully works in both Firefox 1.5.0.2 and IE6, just like i want it to do, but fails in IE7. Hope someone can help me. Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] IE7 May be Pushed out Tomorrow
Does anybody know if it is possible to run both IE 6.x and IE7 both on thesame system? An absolute must if you are a web developer... Use VMware and you can run every version of IE, and Firefox, and any other Windows browser you want to test. http://www.vmware.com/ -Mike ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] IE7 May be Pushed out Tomorrow
Michael Geary schrieb: Does anybody know if it is possible to run both IE 6.x and IE7 both on thesame system? An absolute must if you are a web developer... Use VMware and you can run every version of IE, and Firefox, and any other Windows browser you want to test. http://www.vmware.com/ With the (free) VMware player and a linux image, you can also test the linux browsers from windows. Is there any way to test Safari on a windows system? -- Jörn ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] IE7 May be Pushed out Tomorrow
2006/10/9, Klaus Hartl [EMAIL PROTECTED]: Wow Franck, you are still testing in IE3? ;-) I tried to use it, just for fun... but found no fun :-( Franck. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] IE7 and document.ready
Webunity | Gilles van den Hoven schrieb: Hi Guys, Just found another document.ready bug at least i hope it is a bug :) The document.ready is not firing in IE7 when loading content via ajax into a DIV. Is this a common problem which is allready known? Someone might have a fix for this? The current scenario fires succesfully in both firefox and IE6 just like i want it to be and is like this: - I load some javascripts in the header of the page, in those headers are document.readys - When i load new data into a div, i want the document.readys to fire again, since they do some jQuery magic As said, this scenario successfully works in both Firefox 1.5.0.2 and IE6, just like i want it to do, but fails in IE7. Hope someone can help me. It's weird that it works in IE6 and FF. So far, the solution to this problem was to execute the document ready code in an ajax callback... -- Jörn ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] IE7 May be Pushed out Tomorrow
2006/10/9, Michael Geary [EMAIL PROTECTED]: Use VMware and you can run every version of IE, and Firefox, and any other Windows browser you want to test. There's also an open source alternative: QEmu (http://fabrice.bellard.free.fr/qemu/) I use it and find it faster than vmware. Franck. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Queueing of effects (fx)
And it occurs from left to right correct John? !//-- andy matthews web developer certified advanced coldfusion programmer ICGLink, Inc. [EMAIL PROTECTED] 615.370.1530 x737 --//- -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of John Resig Sent: Monday, October 09, 2006 1:38 PM To: jQuery Discussion. Subject: Re: [jQuery] Queueing of effects (fx) I believe that jQuery has a sort of built in queue in that effects are chainable. So you'd simply write all of the effects in one long chain and each of them would happen in the order you specify in your chain. Exactly, so doing: $(#foo).slideDown('slow').slideUp('slow'); will be queued completely. --John ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New Plugin: Xpander
super cool! Now I want more! How about a customizable hook for better presentation of href such as x.jpg, or x.mp3? On 10/9/06, Jeffrey McClure [EMAIL PROTECTED] wrote: Here is a demo of the plugin in action: Example: http://labs.activespotlight.net/jQuery/Xpander.html Plugin Source: http://labs.activespotlight.net/resources/js/Xpander.js Overview Page: http://jquery.com/docs/Plugins/Xpander/ --- Jeffrey ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] IE7 May be Pushed out Tomorrow
Ⓙⓐⓚⓔ schrieb: You need http://www.browsrcamp.com/ ... real safari via the web! (at least the resultant image of the page)... for free! they even have a priced option for using the other mac browsers and more. I will never understand the use of some screenshots if I want to fix some CSS in a browser... By the way, if you need different versions of Safari side by side have a look here: http://www.michelf.com/projects/multi-safari/ -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New plugin: sparkline
Fixes for Safari: * Apple added Canvas for Dashboard (Tiger) and backported to Panther (as Safari 1.3), in the Mac world that's virtually everyone. Therefore, I added an explicit pass through for Safari because I can't find documentation for proper object detection. :( * The correct usage of stroking is to define the start point (moveTo), followed by your other commands (lineTo, etc).[2] * I back tested against FireFox 1.5 (OS X), don't have anything else handy at the moment. Sorry. Corey 1. http://developer.apple.com/documentation/AppleApplications/ Reference/SafariJSRef/Classes/Canvas.html#//apple_ref/doc/uid/ 30001240-53879 2. http://developer.apple.com/documentation/AppleApplications/ Reference/SafariJSRef/Classes/Canvas.html#//apple_ref/doc/uid/ 30001240-54100 --- sparkline.js2006-10-09 13:53:09.0 -0700 +++ sparkline.safari.js 2006-10-09 13:54:53.0 -0700 @@ -62,7 +62,7 @@ jQuery('#x_x_x').remove(); // Use a canvas element - if (options.useCanvas window.CanvasRenderingContext2D) { + if (options.useCanvas (window.CanvasRenderingContext2D || jQuery.browser.safari)) { var id = '__' + (new Date).getTime(); w = options.width * data.length; @@ -84,7 +84,12 @@ c.beginPath(); for (var i = 0; i data.length; ++i) { var v = Math.floor (((data[i] - min) / (max - min)) * h); - c.lineTo(w * i / (data.length - 1), h - v); + + if (i == 0) { + c.moveTo(w * i / (data.length - 1), h - v); + } else { + c.lineTo(w * i / (data.length - 1), h - v); + } } c.stroke(); } On Oct 7, 2006, at 3:56 AM, Franck Marcia wrote: Hi all, I've released a new plugin: sparkline. A sparkline is an inline graphic (http://www.edwardtufte.com/bboard/q-and-a-fetch-msg? msg_id=0001ORtopic_id=1). I borrowed the idea (and most of the code) from the TiddlyWiki project, a very good one-page wiki (http://www.tiddlywiki.com). Thanks to Jeremy Ruston for his work and his permission. Here is the link to the test page: http://fmarcia.info/jquery/sparkline/sparkline.html It's tested successfully on Windows XP with FF1.5.07, IE5.5, IE6, IE7RC1 and Opera 9.02. However, even if it works fine with FF on Linux, it doesn't behave correctly with Konqueror. I assume it's the same with Safari... As usual, any comment appreciated. Cheers, Franck. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] IE7 May be Pushed out Tomorrow
Just to set expectations on timetables, MS said they would eventually push IE7 out as a high-priority patch a few weeks after general release. So although tech-savvy users may be able to download the final IE7 within a week or two--and many already have IE7 RC2--Aunt Abby probably won't have it for at least several weeks longer. According to Microsoft, you'll see a different alert window for the update when it arrives. They have a picture of it here: http://blogs.msdn.com/ie/archive/2006/07/26/678149.aspx Release must be getting close, though, I just got an email that they are doing one final chat on IE7 this week: http://blogs.msdn.com/ie/archive/2006/10/09/Last-Expert-Zone-Chat-Before-We- Ship-IE.aspx If MS released on their typical Patch Tuesday schedule, the most likely dates for the push would be November 14 or December 12. Big companies often have embargoes on non-essential updates during November and December (too many holidays and vacations) so they may defer IE7 installation into 2007. As far as Microsoft is concerned, ordinary consumers can get updates any time Microsoft is good and ready to send them, so this patch may come out on an unusual day. If we are really unlucky, MS will push IE7 out on an odd day like November 21 and ruin Thanksgiving day for geeks all over the USA. Instead of relaxing with a beer and watching football, or eating turkey around the table with the family, I'll sit with a plate dripping gravy in my lap trying to fix my mom's computer as she says, It just started doing that on Tuesday, now my favorite web sites don't look right! ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Performance question
I have a somewhat related observation. I have discovered that when selecting by ID, the context parameter does not matter. In other words, these two statements are functionally equivalent:$(#myId); and$(#myId, myContext);It's as if when the id selector is passed then the $ method just uses a document.getElementById. Besides the fact that this may produce unexpected results, it also means that you should be careful when using IDs to try to gain performance. Because if the size of your markup is large then this $(#myId, myContext);may actually be slower then this$(.myClass, myContext);I have definitely seen performance gains by using the second one over the first.Brendan On 10/9/06, Raziel Alvarez [EMAIL PROTECTED] wrote: Thanks for all your responses. I actually do all the things that you mentioned: reusing the jQ object, chaining, setting a context, etc. Actually it would be helpful to have some performance analysis on the different kinds of queries, such as searching by ID, by element, class name, attribute, xpath queries, context-delimited, etc., because even though it's somewhat straightforward to know that a search by ID is faster than searching by class name, it'd be interesting (and useful)to know by how much. On 10/7/06, Matt Stith [EMAIL PROTECTED] wrote: yes, that would help quite a bit, since jquery would only need to look once.On 10/7/06, Jacky [EMAIL PROTECTED] wrote: Would caching the jQuery object a help too? Sometimes you just can't keep the chain. e.g. var jqObj = $(#abc); On 10/8/06, Karl Swedberg [EMAIL PROTECTED] wrote: On Oct 7, 2006, at 3:39 PM, George Adamson wrote: An easy performance booster is to use the second param in $() to set a context for the search. Eg: $(DIV.myClass, myParentElement). Perhaps this is what you meant when you mentioned 'getting a parent element' ? Chaining methods is helpful so you can avoid re-querying. If you need to put other code in betwen method calls then reusing the same JQuery object by putting it into a variable beforehand is worth while to save requerying. If you're going to do several queries inside the same parent element (s) then a combination of the above will be a big help. Those sound like good suggestions to me, though I'm no expert. Something I try to keep in mind is the relative speed of different types of queries. This has been mentioned on the list before, but in case you didn't see it, references to IDs are fastest, followed by elements, and then classes. At least, that's how I've understood previous discussions of the topic. So: a.$('#my-id') is faster than $('div#my-id'), and b. $('div.my-class') is faster than $('.my-class') Hop that helps. Karl ___ Karl Swedberg www.englishrules.com www.learningjquery.com___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Best Regards, Jacky 網絡暴民 http://jacky.seezone.net ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___jQuery mailing listdiscuss@jquery.com http://jquery.com/discuss/ ___jQuery mailing listdiscuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New plugin: sparkline
Argh! Does the ML reformat email? sparkline.js-safari.patch Description: Binary data On Oct 9, 2006, at 2:03 PM, Corey Jewett wrote: Fixes for Safari: * Apple added Canvas for Dashboard (Tiger) and backported to Panther (as Safari 1.3), in the Mac world that's virtually everyone. Therefore, I added an explicit pass through for Safari because I can't find documentation for proper object detection. :( * The correct usage of stroking is to define the start point (moveTo), followed by your other commands (lineTo, etc).[2] * I back tested against FireFox 1.5 (OS X), don't have anything else handy at the moment. Sorry. Corey 1. http://developer.apple.com/documentation/AppleApplications/ Reference/SafariJSRef/Classes/Canvas.html#//apple_ref/doc/uid/ 30001240-53879 2. http://developer.apple.com/documentation/AppleApplications/ Reference/SafariJSRef/Classes/Canvas.html#//apple_ref/doc/uid/ 30001240-54100 --- sparkline.js2006-10-09 13:53:09.0 -0700 +++ sparkline.safari.js 2006-10-09 13:54:53.0 -0700 @@ -62,7 +62,7 @@ jQuery('#x_x_x').remove(); // Use a canvas element - if (options.useCanvas window.CanvasRenderingContext2D) { + if (options.useCanvas (window.CanvasRenderingContext2D || jQuery.browser.safari)) { var id = '__' + (new Date).getTime(); w = options.width * data.length; @@ -84,7 +84,12 @@ c.beginPath(); for (var i = 0; i data.length; ++i) { var v = Math.floor (((data[i] - min) / (max - min)) * h); - c.lineTo(w * i / (data.length - 1), h - v); + + if (i == 0) { + c.moveTo(w * i / (data.length - 1), h - v); + } else { + c.lineTo(w * i / (data.length - 1), h - v); + } } c.stroke(); } On Oct 7, 2006, at 3:56 AM, Franck Marcia wrote: Hi all, I've released a new plugin: sparkline. A sparkline is an inline graphic (http://www.edwardtufte.com/bboard/q-and-a-fetch-msg? msg_id=0001ORtopic_id=1). I borrowed the idea (and most of the code) from the TiddlyWiki project, a very good one-page wiki (http://www.tiddlywiki.com). Thanks to Jeremy Ruston for his work and his permission. Here is the link to the test page: http://fmarcia.info/jquery/sparkline/sparkline.html It's tested successfully on Windows XP with FF1.5.07, IE5.5, IE6, IE7RC1 and Opera 9.02. However, even if it works fine with FF on Linux, it doesn't behave correctly with Konqueror. I assume it's the same with Safari... As usual, any comment appreciated. Cheers, Franck. ___ 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] Comparison of jQuery and dojo?
Has anyone posted a comparison of the pros and cons of jQuery and dojo? Sam ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Performance question
On 10/9/06, Brendan O'Brien [EMAIL PROTECTED] wrote: It's as if when the id selector is passed then the $ method just uses a document.getElementById.Well IDs are supposed to be unique throughout the entire document (i.e. there can be one and only one element in the entire document with an ID of myId), so why shouldn't it simply use document.getElementById? ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] mp3player plugin
hey, I updated my mp3player plugin with an option to play a file on start up and choice of flash player. I also documented the options in the source file. to counter the flickering in IE please use the hack found in the discussion list or another solution. I would like some feedback, thank you. Enjoy David ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] new jquery breaks $(document).load ?
hello everyone, i'm currently developing a site for which jQuery has proven to be more than useful. the problem is that I updated the .js (I'm using the compressed one) since I was having problems with the Interface plugin (jQuery is not defined). however, now the page won't execute whats inside the $(document).load function. is it deprecated? oh, and one more thing. it seems the new jQuery version also won't execute the AJAX (.load) calls I'm using inside other (common, not jQuery) javascript functions. also deprecated? I've googled all around and found nothing yet, so I hope I can get some pointers over here. thanks everyone in advance. regards, Tomas ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Sifr jQuery hack
So I had the need today to use jQuery selectors in SIFR (whose selectors are pretty weak). Unfortunately, sifr only takes selectors, so I did a little hacking:Added the following on line 454 of sifr.js /* Check if we can find any nodes first */ if(sSelector.parentNode) { listNodes = [sSelector]; } else { var listNodes = parseSelector(sSelector); if(listNodes.length == 0){ return false }; }replacing:var listNodes = parseSelector(sSelector); if(listNodes.length == 0){ return false };Then, I created a little plugin:jQuery.fn.sIFR = function(namedHash) { $(this).each(function() { if(typeof sIFR == function) { sIFR.replaceElement(this, named(namedHash)); } });}the namedHash is the hash required by sIFR, so you can now do stuff like $(.links li:not([ul])).sIFR({ sFlashSrc: sifr/gotham.swf, sColor: #66, sHoverColor: #983434 });-- Yehuda KatzWeb Developer | Wycats Designs(ph)718.877.1325 ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] new jquery breaks $(document).load ?
$(document).ready doesn't work every time. that's why I had to use .load. is there a reason as to why .load breaks in the new versions of jquery? Use $(document).ready(function() { //stuff }); On 10/9/06, tomas pollak [EMAIL PROTECTED] wrote: hello everyone, i'm currently developing a site for which jQuery has proven to be more than useful. the problem is that I updated the .js (I'm using the compressed one) since I was having problems with the Interface plugin (jQuery is not defined). however, now the page won't execute whats inside the $(document).load function. is it deprecated? oh, and one more thing. it seems the new jQuery version also won't execute the AJAX (.load) calls I'm using inside other (common, not jQuery) javascript functions. also deprecated? I've googled all around and found nothing yet, so I hope I can get some pointers over here. thanks everyone in advance. regards, Tomas ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] IE7 May be Pushed out Tomorrow
Hi, Webunity|Gilles van den Hoven wrote: Rey Bango wrote: If you don't want to upgrade, be very vigilant about what automatic updates you install during MS' normal patch cycle: Does anybody know if it is possible to run both IE 6.x and IE7 both on thesame system? An absolute must if you are a web developer... I don't think you can do this on windows, but you can on linux once they get IE 7 running. See IEs4linux - http://www.tatanka.com.br/ies4linux/page/Main_Page for more information. Gordon. Thanx Gilles ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ !DSPAM:1000,452aac6387166732721593! ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Performance question
From: Brendan O'Brien I have a somewhat related observation. I have discovered that when selecting by ID, the context parameter does not matter. In other words, these two statements are functionally equivalent: $(#myId); and $(#myId, myContext); It's as if when the id selector is passed then the $ method just uses a document.getElementById. Indeed it does just that. See this code in jquery.js: var re2 = /^([#.]?)([a-z0-9\\*_-]*)/i; var m = re2.exec(t); if ( m[1] == # ) { // Ummm, should make this work in all XML docs var oid = document.getElementById(m[2]); r = ret = oid ? [oid] : []; t = t.replace( re2, ); } else { if ( !m[2] || m[1] == . ) m[2] = *; for ( var i = 0; i ret.length; i++ ) r = jQuery.merge( r, m[2] == * ? jQuery.getAll(ret[i]) : ret[i].getElementsByTagName(m[2]) ); } Besides the fact that this may produce unexpected results... Well, IDs are supposed to be unique in a document, so $(myId,myContext) doesn't seem all that useful even if the code did make use of it. It would reject the case where #myId exists but is outside of myContext, and work the same as the current code in the the other two cases (myId doesn't exist, or myId does exist inside myContext). Is that what you were trying to do - operate on element #myId but only if that element is inside myContext, ignoring it if that element is outside myContext? If that's not the requirement, then you can just leave out myContext. it also means that you should be careful when using IDs to try to gain performance. Because if the size of your markup is large then this $(#myId, myContext); may actually be slower then this $(.myClass, myContext); I have definitely seen performance gains by using the second one over the first. That's an interesting result. I would have guessed (hoped?) that #myId should be fast even in a large document - don't most browsers load all the IDs into a hash table? I wonder how the comparison turns out in different browsers. You might try the comparison with $(myId) instead of $(#myId,myContext), but I'll bet it wouldn't make any difference since the code doesn't use the context. (This should certainly be documented if it isn't already.) -Mike ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] new jquery breaks $(document).load ?
ready is fixed in the new versions, it works fine in all supported browsers. On 10/9/06, tomás pollak [EMAIL PROTECTED] wrote: $(document).ready doesn't work every time. that's why I had to use .load. is there a reason as to why .load breaks in the new versions of jquery? Use $(document).ready(function() { //stuff }); On 10/9/06, tomas pollak [EMAIL PROTECTED] wrote: hello everyone, i'm currently developing a site for which jQuery has proven to be more than useful. the problem is that I updated the .js (I'm using the compressed one) since I was having problems with the Interface plugin (jQuery is not defined). however, now the page won't execute whats inside the $(document).load function. is it deprecated? oh, and one more thing. it seems the new jQuery version also won't execute the AJAX (.load) calls I'm using inside other (common, not jQuery) javascript functions. also deprecated? I've googled all around and found nothing yet, so I hope I can get some pointers over here. thanks everyone in advance. regards, Tomas ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] new jquery breaks $(document).load ?
$(document).ready doesn't work every time. that's why I had to use .load. When does .ready break? It shouldn't break in any modern browser. Do you think you could clarify the situation at all? --John ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] new jquery breaks $(document).load ?
you're right. it does work all the time. however, the AJAX .load function doesn't. could it be because the call is being made inside a normal JS function? On 10/9/06, Matt Stith [EMAIL PROTECTED] wrote: ready is fixed in the new versions, it works fine in all supported browsers. On 10/9/06, tomás pollak [EMAIL PROTECTED] wrote: $(document).ready doesn't work every time. that's why I had to use .load. is there a reason as to why .load breaks in the new versions of jquery? Use $(document).ready(function() { //stuff }); On 10/9/06, tomas pollak [EMAIL PROTECTED] wrote: hello everyone, i'm currently developing a site for which jQuery has proven to be more than useful. the problem is that I updated the .js (I'm using the compressed one) since I was having problems with the Interface plugin (jQuery is not defined). however, now the page won't execute whats inside the $(document).load function. is it deprecated? oh, and one more thing. it seems the new jQuery version also won't execute the AJAX (.load) calls I'm using inside other (common, not jQuery) javascript functions. also deprecated? I've googled all around and found nothing yet, so I hope I can get some pointers over here. thanks everyone in advance. regards, Tomas ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Aardvark - Desarrollo Web - http://aardvark.cl/ www.bootlog.cl — la bitácora de mis pasos ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] mp3player plugin
pls show us the docs and the source again, i havent tagged it on delicious yet.. =)and there may have new ppl on the list who would like to have it on their gmail account.. hehehe 2006/10/9, David [EMAIL PROTECTED]: hey,I updated my mp3player plugin with an option to play a file on start upand choice of flash player.I also documented the options in the sourcefile.to counter the flickering in IE please use the hack found in the discussion list or another solution.I would like some feedback, thank you.EnjoyDavid___jQuery mailing list discuss@jquery.comhttp://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] How to implement file upload using AJAX?
Refer messagehttp://jquery.com/discuss/2006-August/009877/if anyone is in the mood for creating an upload plugin :-) On 10/9/06, Brian Miller [EMAIL PROTECTED] wrote: You can't use ajax to send files.It's not supported because it's notpermitted.The libraries that do it (e.g. Yahoo UI) create a hidden iframe on thefly, with a form inside the iframe (that has a file upload control), which gets submitted.It's as much of a pain as it sounds like it is.Other efforts use Flash or a Java applet to help.That said, it's possible that someone can put together a plugin thatimplements the iframe hack. - Brian Hi, Does anybody know how a file pload using AJAX can be implemented in JQuery? If so, please give me an example. I intend to use PHP for the data receiving, but the problem is the sending actually. Thanks in advance Emilian -- View this message in context: http://www.nabble.com/How-to-implement-file-upload-using-AJAX--tf2408953.html#a6714606 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/___jQuery mailing list discuss@jquery.comhttp://jquery.com/discuss/-- Reach1to1 Communicationshttp://www.reach1to1.com [EMAIL PROTECTED]98201-94408 ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] IE7 May be Pushed out Tomorrow
Great points Dave. I'm more concerned about people that have automatic updates set to just install versus prompting. Thats why I sent out this alert. Considering how MS threw in WGA as a critical update for many Windows users without really letting them know what they were getting, I wouldn't put a foced upgrade to IE7 past them. Rey... Dave Methvin wrote: Just to set expectations on timetables, MS said they would eventually push IE7 out as a high-priority patch a few weeks after general release. So although tech-savvy users may be able to download the final IE7 within a week or two--and many already have IE7 RC2--Aunt Abby probably won't have it for at least several weeks longer. According to Microsoft, you'll see a different alert window for the update when it arrives. They have a picture of it here: http://blogs.msdn.com/ie/archive/2006/07/26/678149.aspx Release must be getting close, though, I just got an email that they are doing one final chat on IE7 this week: http://blogs.msdn.com/ie/archive/2006/10/09/Last-Expert-Zone-Chat-Before-We- Ship-IE.aspx If MS released on their typical Patch Tuesday schedule, the most likely dates for the push would be November 14 or December 12. Big companies often have embargoes on non-essential updates during November and December (too many holidays and vacations) so they may defer IE7 installation into 2007. As far as Microsoft is concerned, ordinary consumers can get updates any time Microsoft is good and ready to send them, so this patch may come out on an unusual day. If we are really unlucky, MS will push IE7 out on an odd day like November 21 and ruin Thanksgiving day for geeks all over the USA. Instead of relaxing with a beer and watching football, or eating turkey around the table with the family, I'll sit with a plate dripping gravy in my lap trying to fix my mom's computer as she says, It just started doing that on Tuesday, now my favorite web sites don't look right! ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] jQuery 1.0.2
Hi Everyone - jQuery 1.0.2 is now ready for consumption! This release is a huge bug fix release - and it is highly recommended that you upgrade right away. As always, if you spot a bug, please add it to the bug tracker. In addition to having a better test suite, a big push for this release was to have better cross-browser compatibility for common tasks (such as AJAX operations). Functionally, however, no major features have been added to this release (although, expect some new code come 1.1). I'd like to take this opportunity to introduce everyone to Jörn Zaefferer. Much of this release was made possible by him. He's responsible for completely overhauling the test suite (it now has over 260+ tests!) and for fixing the majority of the current bugs and enhancements (over 60 of them!). If you want someone to thank for this release, it should be him. * jQuery 1.0.2 http://jquery.com/src/jquery-1.0.2.js * jQuery 1.0.2 Compressed http://jquery.com/src/jquery-1.0.2.pack.js Thanks, everyone, for your support. --John ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery 1.0.2
Quoting John Resig [EMAIL PROTECTED]: jQuery 1.0.2 is now ready for consumption! Thank you so much. I'd like to take this opportunity to introduce everyone to Jörn Zaefferer. Love that guy! ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery 1.0.2
Thank you John Jörn all 8) -will ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery 1.0.2
Yes, we all know how much work is involved in fixing bugs. Thanks to both of you. :)BlairOn 10/10/06, Will Arp [EMAIL PROTECTED] wrote:Thank you John Jörn all8)-will___ jQuery mailing listdiscuss@jquery.comhttp://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuery 1.0.2
Thanks for your efforts gents! Rey John Resig wrote: Hi Everyone - jQuery 1.0.2 is now ready for consumption! This release is a huge bug fix release - and it is highly recommended that you upgrade right away. As always, if you spot a bug, please add it to the bug tracker. In addition to having a better test suite, a big push for this release was to have better cross-browser compatibility for common tasks (such as AJAX operations). Functionally, however, no major features have been added to this release (although, expect some new code come 1.1). I'd like to take this opportunity to introduce everyone to Jörn Zaefferer. Much of this release was made possible by him. He's responsible for completely overhauling the test suite (it now has over 260+ tests!) and for fixing the majority of the current bugs and enhancements (over 60 of them!). If you want someone to thank for this release, it should be him. * jQuery 1.0.2 http://jquery.com/src/jquery-1.0.2.js * jQuery 1.0.2 Compressed http://jquery.com/src/jquery-1.0.2.pack.js Thanks, everyone, for your support. --John ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/