[jquery-dev] Re: window === window.top false in IE8, thus late ready...

2009-10-08 Thread John Resig
I landed a fix for this, looks like it was reverted since 1.3.2. I added a note to make sure that we don't change it: http://dev.jquery.com/changeset/6616 --John On Tue, Oct 6, 2009 at 6:50 AM, Klaus Hartl klaus.ha...@googlemail.com wrote: Hi all, in IE8 window === window.top is false,

[jquery-dev] Re: CDN failover to domain-provided js files?

2009-10-06 Thread John Resig
You could probably do something like this: script src=somecdn.com/jquery.js/script script if ( typeof jQuery === undefined ) { document.write(script src='local/jquery.js'/script); } /script It's not shiny, but it would work - and avoid loading two copies of jQuery. --John On Tue, Oct 6,

[jquery-dev] Re: mousewheel patch

2009-09-30 Thread John Resig
Probably not, no. --John On Tue, Sep 29, 2009 at 10:11 PM, pbcomm pbc...@gmail.com wrote: John, Will the mousewheel patch in ticket #4402 make it to 1.4? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[jquery-dev] Re: What about event delegation for change, submit, reset and select?

2009-09-20 Thread John Resig
Doesn't that run contrary to the idea behind the live method? In that you can bind an event to any element that currently exists and will exist? This is really a non-solution, unfortunately. --John On Sun, Sep 20, 2009 at 9:43 AM, lrbabe lrb...@gmail.com wrote: Hello everybody, I know that

[jquery-dev] Re: What about event delegation for change, submit, reset and select?

2009-09-20 Thread John Resig
implementation of focus, something that we already have in trunk and works pretty well. On Sep 20, 4:20 pm, John Resig jere...@gmail.com wrote: Doesn't that run contrary to the idea behind the live method? In that you can bind an event to any element that currently exists and will exist

[jquery-dev] Re: About Selectors Right To Left

2009-09-16 Thread John Resig
As I mentioned in the talk, Sizzle is right-to-left but makes an exception for when an ID is the first item in the selector - it uses that as the root context, speeding things up. --John On Wed, Sep 16, 2009 at 6:34 PM, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Sizzle also uses

[jquery-dev] Re: QUnit to check for globals

2009-09-15 Thread John Resig
I had to revert the change - it was causing problems in the suite - specifically Opera was failing across the board (anything with an id was being added as global variable - which caused a conflict on nearly every test) - perhaps we could avoid this one? --John On Tue, Sep 15, 2009 at 4:45 PM,

[jquery-dev] Re: Event Delegation

2009-09-14 Thread John Resig
Best way to listen and remove multiple events for a single delegated event? (EX: delegate on submit, listen for keypress and click) I recommend using special events - this is built in to jQuery core and it's precisely what it's used for (we were planning on using them to implement submit and

[jquery-dev] Re: Event Delegation

2009-09-14 Thread John Resig
I'm not sure what to do about this. I'd like to make the special case of live avoid: handlers[ handler.guid ] = handler; and instead do handlers['click'][ handler.guid ] = handler; Thoughts? I know you guys are busy, but I'd like to know that my work might have a chance at being used

[jquery-dev] Re: $('selector').live( function() { } )

2009-09-07 Thread John Resig
Just be aware the mutation events don't work in all browsers. If you want similar functionality to what you proposed you can use the liveQuery plugin: http://plugins.jquery.com/project/livequery/ We debated adding something like this to core, but the overhead ended up being very high (every

[jquery-dev] Re: syntax error - Expr.attrHandle.href = sw_httprp_rewrite_url(function (elem){)\n

2009-08-28 Thread John Resig
Could you just prevent the proxy from manipulating js files? --John On Fri, Aug 28, 2009 at 3:37 AM, Angelaangela.chu...@gmail.com wrote: Hi, I am getting the above error which is part of the jQuery library when running my application through SonicWall reverse proxy and all the

[jquery-dev] Re: jQuery Dynamic Composition

2009-08-22 Thread John Resig
Additionally, if there is an appreciable difference, it's likely that we would just change the logic in jQuery itself to only initialize the specific code branches once (which is something that we should be doing anyway). --John On Sat, Aug 22, 2009 at 2:01 PM, Kevin

[jquery-dev] Re: $()[0] == document // strange !?

2009-08-21 Thread John Resig
I should note that I really do want to make $() == [], I just want to make sure that no one's code is broken because of it. I'm fairly certain that it won't cause major problems, but I'm not 100% certain. (Note: Actually .ready() ignores the incoming selector when it binds the ready event,

[jquery-dev] Re: $()[0] == document // strange !?

2009-08-21 Thread John Resig
One more thing I noticed about the magic selector vs. HTML detection is this curiosity:    $('wordbr/').length == 1;    $('br/word').length == 1;    $('br/wordbr/').length == 3; I was hesitant to enable the first two because it can be ambivalent. Stuff like this: $(a[title=foo]) $(a )

[jquery-dev] Re: update $(this) from within a plugin call

2009-08-19 Thread John Resig
But the point is that you wrapped a function that could be useful for I don;t know how many plugins/extensions/improvements ... so, is there any chance you'll expose contains from selector.js ? Yep, that is something that we're looking to expose. --John

[jquery-dev] Re: Separation of browser-specific code

2009-08-19 Thread John Resig
That would assume that it's possible to split jQurey components out by browser - but it is not. All bug fixes are handled on-the-fly, determined using feature detection. Although, the vast majority of the detections do target IE. --John On Wed, Aug 19, 2009 at 5:18 PM,

[jquery-dev] Re: Speeding up $.className.* ?

2009-08-18 Thread John Resig
I actually have a patch waiting to completely remove $.className and severely optimize it at the same time. I'll check out your optimizations as well, although I suspect that most of them are already covered. --John On Tue, Aug 18, 2009 at 6:17 AM, Már Örlygsson mar.orlygs...@gmail.comwrote:

[jquery-dev] Re: update $(this) from within a plugin call

2009-08-18 Thread John Resig
Well, you could just manipulate this[0], this[1], etc. directly - but it's strongly preferred that you return the new result with pushStack (as you've done) since that conforms with the typical way of constructing jQuery methods and plugins. --John On Mon, Aug 17, 2009 at 3:46 PM, jeanph01

[jquery-dev] Re: JSON reviver option

2009-08-18 Thread John Resig
...@gmail.comwrote: IIRC json2 supports it... We could get around to fixing that old piece of missing functionality in jQuery and kill two birds with one stone. ~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name] John Resig wrote: I'd be wary of adding that - especially since

[jquery-dev] Re: update $(this) from within a plugin call

2009-08-18 Thread John Resig
manipulation. That test for example is now: var div = document.getElementsByTagName(div), i = 0; while(div[i]) div[i++].innerHTML = leak?; return i; because getElementsByTagName is live and I do not want to trap anything. Makes sense? On Tue, Aug 18, 2009 at 1:40 PM, John Resig jere

[jquery-dev] Re: update $(this) from within a plugin call

2009-08-18 Thread John Resig
Not really, right? You can still modify and re-place nodes that have been removed from the dom, but not on nodes that have been destroyed. div id=barphi/ppthere/p/div var ps = $(#bar p).remove(); $(#bar).html(phmm/p); ps.appendTo(#bar) or some such. Removed from the DOM via an

[jquery-dev] Re: update $(this) from within a plugin call

2009-08-18 Thread John Resig
function it requires to be inside the library since if I am not wrong contains is not exposed. What do you think? On Tue, Aug 18, 2009 at 4:00 PM, John Resig jere...@gmail.com wrote: Not really, right? You can still modify and re-place nodes that have been removed from the dom

[jquery-dev] Re: Download page lacks links to Google's Ajax libraries API

2009-08-17 Thread John Resig
Nope - feel free to add it! --John On Mon, Aug 17, 2009 at 9:11 AM, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Is there a reason that http://docs.jquery.com/Downloading_jQuery doesn't link to http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js? Jörn

[jquery-dev] Re: when will 1.3.3 be released ?

2009-08-17 Thread John Resig
We'll release it when it's ready - we're hoping before the end of the month. --John On Mon, Aug 17, 2009 at 10:21 AM, jeanph01 jeanp...@gmail.com wrote: Hi! My code is 2x faster (according to firebug profile) with the 1.3.3 nightly build compared to 1.3.2 release. So when 1.3.3 will be

[jquery-dev] Re: making .closest() faster on common selectors to improve performance of event delegation.

2009-08-17 Thread John Resig
to a green span: calls = 13, time ~= 0.3ms - moving from a green span to a red span: calls = 13, time ~= 0.3ms ...and we have only three levels of elements here. On Aug 15, 1:51 am, John Resig jere...@gmail.com wrote: An interesting proposition - although before making a change

[jquery-dev] Re: The Context property/parameter

2009-08-14 Thread John Resig
That can't be true, right? It doesn't search the whole doc. Correct, it only searches the limited sub-set. The context property may be document but .myClass is only searched for within #myContainer, right? (this is how I see it, after looking at the source) I think the main reason people

[jquery-dev] Re: Two questions about jQuery's inside

2009-08-14 Thread John Resig
1. The function hasClass is written this way: hasClass: function( selector ) { return !!selector this.is( . + selector ); }, Why not simply testing the className against the selector: return !!selector ( + this.className + ).indexOf( + selector + ) != -1; Actually, this was

[jquery-dev] Re: Building a cut-down version of jQuery

2009-08-14 Thread John Resig
What lines are you commenting out of the make file? I know a few of us have done custom builds before, and it's worked, so there may be another issue at play here. --John On Fri, Aug 14, 2009 at 1:30 AM, braksa...@gmail.com braksa...@gmail.comwrote: I have written a small amount of jQuery

[jquery-dev] Re: .attr(checked, checked) not working in IE7

2009-08-14 Thread John Resig
Do you have a full example? .attr(checked, checked) should work. --John On Thu, Aug 13, 2009 at 5:00 PM, TheMit the...@gmail.com wrote: in IE7: code $('#rb').attr(checked, checked) /code does not check a radiobutton, and code $('#rb').removeAttr(checked) /code does not uncheck a

[jquery-dev] Re: width not correct before positioning

2009-08-14 Thread John Resig
This makes sense, right? I mean the element is positioned relatively (to begin with) thus its width consumes its parent container (which is the body, in this case). Not until you position it absolutely does the width 'shrink' back down. --John On Fri, Aug 14, 2009 at 9:36 AM, tbee

[jquery-dev] Re: making .closest() faster on common selectors to improve performance of event delegation.

2009-08-14 Thread John Resig
An interesting proposition - although before making a change of this magnitude it would be good to get some performance numbers outlined so that we know how worthwhile it is. --John On Fri, Aug 14, 2009 at 8:33 PM, lrbabe lrb...@gmail.com wrote: Hi, The principle of .closest( selector ) is

[jquery-dev] Re: Change :odd and :even to behave like :nth-child(odd) and :nth-child(even)

2009-08-13 Thread John Resig
:odd/:even aren't the same as using :nth-child() - you can't just substitute one for the other. :odd/:even operate against the entire result set whereas :nth-child() operates against the position of the element in relation to its siblings. I'm not a big fan of making backwards-incompatible

[jquery-dev] Re: Bug with :hidden selector and tbody in Internet Explorer

2009-08-13 Thread John Resig
.css(display) == none would probably do the trick, as well. --John On Wed, Aug 12, 2009 at 8:40 PM, juuntu juu...@gmail.com wrote: Is there an alternative for .is(':hidden') until this fix goes through? On Jul 23, 10:23 am, John Resig jere...@gmail.com wrote: Ok, I think

[jquery-dev] Re: Bug

2009-08-13 Thread John Resig
This should be posted to the jQuery UI list. http://groups.google.com/group/jquery-ui --John On Thu, Aug 13, 2009 at 8:42 AM, ARZ amirreza.zari...@gmail.com wrote: Hi I found a very big bug in jquery ui 1.7.2 please run this code and see what happend:

[jquery-dev] Re: Ajax Requests Throw Error If User Clicks a Link on a Page While the Request Is Still Active

2009-08-12 Thread John Resig
I'm curious - what happens if you try the latest jQuery nightlies? http://code.jquery.com/jquery-nightly.js --John On Wed, Aug 12, 2009 at 5:06 AM, zacware st...@weintraut.net wrote: Here's a sample to demo the issue: http://homepage.mac.com/zacware/xhr_bug/xhr_bug.htm We deployed our

[jquery-dev] Re: Ajax Requests Throw Error If User Clicks a Link on a Page While the Request Is Still Active

2009-08-12 Thread John Resig
? It sounds logical if error catch abort operations as well. Maybe I am missing something On Wed, Aug 12, 2009 at 3:21 PM, John Resig jere...@gmail.com wrote: I'm curious - what happens if you try the latest jQuery nightlies? http://code.jquery.com/jquery-nightly.js --John

[jquery-dev] Re: Global event bindind/triggering namespaces behavior

2009-08-12 Thread John Resig
The problem is that you're thinking of them like Java namespaces (or the same in other languages). You need to think of them like class names. e.g. $('a.foo.bar') is sort of like .bind(click.foo.bar) or .trigger(click.foo). --John On Wed, Aug 12, 2009 at 12:49 PM, ludovic

[jquery-dev] Re: Global event bindind/triggering namespaces behavior

2009-08-12 Thread John Resig
Hierarchical restriction is too limited. You need to be able to manipulate events (and data) that exist in multiple realms simultaneously - which is why using the class name model suits the structure perfectly. --John On Wed, Aug 12, 2009 at 1:41 PM, ludovic ludothebe...@gmail.com wrote:

[jquery-dev] Re: Bug: selectors with commas in IE 7

2009-08-11 Thread John Resig
Unfortunately I haven't had a chance to look in to this yet, but thanks for your reduction - it'll certainly help! --John On Tue, Aug 11, 2009 at 1:55 PM, glyphobet glypho...@gmail.com wrote: I have confirmed that this is happening for other people in the IRC channel, and added some more

[jquery-dev] Re: Recursive $.extend should manage loops

2009-08-11 Thread John Resig
- after all, it is only a condition to add if( typeof mapping[ copy ] != 'undefined' ) { target[ name ] = mapping[ copy ]; } where copy would be the object inside a cycle. In fact, it is a bit more complex, but not more costly Well, except you have to hash the object to get an accurate

[jquery-dev] Re: prototypal inheritance as part of jQuery core?

2009-08-11 Thread John Resig
Haha, you guys crack me up. --John On Tue, Aug 11, 2009 at 9:23 PM, Michael Geary m...@mg.to wrote: Well! Maybe you *should* read a good book on JavaScript before you go making careless posts again. All we know about here is jQuery, but the guys on comp.lang.javascript said there's only

[jquery-dev] Re: jQuery.domManip - script tag will be removed

2009-08-10 Thread John Resig
When a script node is inserted into the document it is also executed (by jQuery). To avoid re-executing it later (this happens a lot, as it turns out) the script is simply removed from the document. Naturally, this causes some issues when you actually want to see the contents of the script

[jquery-dev] Re: Changes to closest (#6507) breaks $(event.target).closest(...) in event handlers

2009-08-10 Thread John Resig
The download page of the jQuery site instructs you on how to make your own builds: http://docs.jquery.com/Downloading_jQuery#Subversion_.28SVN.29 --John On Mon, Aug 10, 2009 at 3:38 PM, mike.helgeson mike.helge...@gmail.comwrote: (again) Could someone please update the nightly?

[jquery-dev] Re: RFC on Bug 4834: Don't set window.$ until the outro

2009-08-10 Thread John Resig
I agree that this is an exceedingly rare situation in which this occurs (e.g. it only seems to occur with a 2 year old version of Prototype - the problem has been fixed in Prorotype 1.6+). Although, the change seems pretty painless, so I've just landed it: http://dev.jquery.com/changeset/6529

[jquery-dev] Re: RFC on Bug 4834: Don't set window.$ until the outro

2009-08-10 Thread John Resig
, they might have been ignored. On the other hand of course, we never officially supported such a use of the library :) On Mon, Aug 10, 2009 at 11:23 PM, John Resig jere...@gmail.com wrote: I agree that this is an exceedingly rare situation in which this occurs (e.g. it only seems to occur with a 2 year

[jquery-dev] Re: Obtaining original function from $.live()

2009-08-07 Thread John Resig
for the function in the cache - but of course there is no way to get the wrapped function, just the wrapper. Regards, Allan On Aug 7, 4:34 pm, John Resig jere...@gmail.com wrote: Unfortunately the original function is kind of tucked away, since $().live() is really just a shortcut

[jquery-dev] Re: Ticket #4917

2009-08-07 Thread John Resig
Unfortunately I haven't had a chance to look in to it yet, but I will try to as soon as possible. --John On Fri, Aug 7, 2009 at 4:23 PM, Jeffrey Kretz jeffkr...@hotmail.com wrote: Has anyone had a chance to look over this ticket? http://dev.jquery.com/ticket/4917 It is a critical

[jquery-dev] Re: $('divfoo/div') and application/xml

2009-08-06 Thread John Resig
Yeah, file a bug and attach the patch and I can look in to it. --John On Thu, Aug 6, 2009 at 2:08 PM, Jack Bates jack.ba...@gmail.com wrote: $('divfoo/div') doesn't work when the content type is 'application/ xml'. I guess this is because an XML DOM doesn't support innerHTML()? One might

[jquery-dev] Re: parents() order

2009-08-05 Thread John Resig
Hmm, that sounds like a bug. Could you file one, please? http://dev.jquery.com/newticket --John On Wed, Aug 5, 2009 at 8:40 AM, Ant anthony.johns...@antix.co.uk wrote: Hiya, When you look at the returned elements when using parents() you get the reverse order as expected and documented

[jquery-dev] Re: getting what Mouse Button was pressed for a generic browserr ??

2009-08-05 Thread John Resig
Just use event.which - which provides the correct value in all browsers (as corrected by jQuery). --John On Wed, Aug 5, 2009 at 4:39 PM, Ankit Mody ankit...@gmail.com wrote: Hey guys, I require detecting what button of the mouse was pressed by the user ... I have the event handlers for

[jquery-dev] Re: JQuery Fx Unit Test

2009-08-03 Thread John Resig
and then update our test system to that version so that we the most current version of jquery. Thanks again, Clint On Jul 31, 6:43 am, John Resig jere...@gmail.com wrote: I've looked into this issue a bit and, so far, the only thing I've been able to determine is that sometimes when

[jquery-dev] Re: JQuery Fx Unit Test

2009-07-31 Thread John Resig
I've looked into this issue a bit and, so far, the only thing I've been able to determine is that sometimes when a browser is under heavy load timers start to work incorrectly (I've noticed this much more so in Firefox, and to a lesser degree in Safari). Sometimes one timer will fire after

[jquery-dev] Re: Changes to closest (#6507) breaks $(event.target).closest(...) in event handlers

2009-07-28 Thread John Resig
Yeah, it broke other stuff as well, already backed out. --John On Tue, Jul 28, 2009 at 7:46 AM, Mark Gibson jollyt...@gmail.com wrote: Any event handlers that follow this pattern no longer work: $('.container').bind('click', function(event) {

[jquery-dev] Re: #4833 isXml function throws an error in IE when used in combination with an iframe

2009-07-27 Thread John Resig
isXMLDoc had changed since you had last made a patch, however I made, and applied, a new one. Also took the opportunity to write up some decent unit tests for isXMLDoc. http://dev.jquery.com/changeset/6510 --John On Mon, Jul 27, 2009 at 7:53 AM, Christiaan Baartse anotherh...@gmail.comwrote:

[jquery-dev] Re: #4833 isXml function throws an error in IE when used in combination with an iframe

2009-07-27 Thread John Resig
Your solution doesn't appear to be correct: ((elem.ownerDocument || elem).documentElement || false).nodeName That could result in false.nodeName - which would cause an exception. --John On Mon, Jul 27, 2009 at 9:11 AM, Andrea Giammarchi andrea.giammar...@gmail.com wrote:

[jquery-dev] Re: #4833 isXml function throws an error in IE when used in combination with an iframe

2009-07-27 Thread John Resig
Err, wait - no it wouldn't. Nevermind. --John On Mon, Jul 27, 2009 at 9:18 AM, John Resig jere...@gmail.com wrote: Your solution doesn't appear to be correct: ((elem.ownerDocument || elem).documentElement || false).nodeName That could result in false.nodeName - which would cause

[jquery-dev] Re: #4833 isXml function throws an error in IE when used in combination with an iframe

2009-07-27 Thread John Resig
Too late: http://dev.jquery.com/changeset/6511 --John On Mon, Jul 27, 2009 at 9:21 AM, Andrea Giammarchi andrea.giammar...@gmail.com wrote: I am posting a patch ;-) On Mon, Jul 27, 2009 at 2:19 PM, John Resig jere...@gmail.com wrote: Err, wait - no it wouldn't. Nevermind. --John

[jquery-dev] Re: #4833 isXml function throws an error in IE when used in combination with an iframe

2009-07-27 Thread John Resig
this went damn fast.. I just got 1 more change to 1.3.2 in the jQuery.js I'm using. Its discribed in here http://groups.google.com/group/jquery-dev/browse_thread/thread/9c54083394a7df30 that hack fixed it for me as well. Should I make a ticket for this? On 27 jul, 15:22, John Resig jere

[jquery-dev] Re: uncaught exception: Node was not found (NS_ERROR_DOM_NOT_FOUND_ERR)

2009-07-27 Thread John Resig
)) onload(); }; } The onload variable is because in some browser ( not sure it is only with iframes ) you cannot call el.onload directly. Let me know what you think. Regards On Wed, Jul 22, 2009 at 3:48 PM, John Resig jere...@gmail.com wrote: It's

[jquery-dev] Re: Patch to fix getJSON in a Firefox extension context

2009-07-27 Thread John Resig
Yeah, I'm with Andrea here - that seems much safer (and more generic). Gael - can you verify that this change works for you? --John On Mon, Jul 27, 2009 at 2:23 PM, Andrea Giammarchi andrea.giammar...@gmail.com wrote: var head = doc.getElementsByTagName(head)[0] || doc.documentElement; ???

[jquery-dev] Re: Trac Problems

2009-07-27 Thread John Resig
I can't believe you are even system administrator here ... btw, I would update Python version and Trac as well :P Thankfully (to the benefit of us all) we're getting more people on board to help with sysadmin-ing tasks (Mike Hostetler and Jonathan Sharp, to name a few). The dev site is

[jquery-dev] Re: 1.3.3 nightly html script execution problems

2009-07-27 Thread John Resig
Weird... it really is on the 3rd time. I've got some ideas, I'll have to dig in. --John On Mon, Jul 27, 2009 at 5:40 PM, mike.helgeson mike.helge...@gmail.comwrote: I have a small demo system, where you can edit and execute source code directly in the same page, and load and execute new

[jquery-dev] Re: jquery latest nightly and CS4 crash

2009-07-25 Thread John Resig
That's... amusing. Definitely interested to see if anyone can verify this. --John On Sat, Jul 25, 2009 at 8:28 AM, mike.helgeson mike.helge...@gmail.comwrote: I have not been able to open the latest jquuery nightly build (1.3.3pre) in Dreamweaver CS4 (64bit Vista). The program crashes

[jquery-dev] Re: Ajax.serialize dealing with submit

2009-07-24 Thread John Resig
A submit button's value is only submitted to a server if it is clicked - .serialize() has no reason to serialize it (explicitly) because it doesn't watch for clicks occurring. I recommend the jQuery Form plugin for that: http://malsup.com/jquery/form/#api --John On Fri, Jul 24, 2009 at 1:26

[jquery-dev] Re: IE bug when displaying JQuery Slider

2009-07-24 Thread John Resig
This question would be better suited for the jQuery UI group: http://groups.google.com/group/jquery-ui --John On Fri, Jul 24, 2009 at 1:14 PM, Crimson Shroud crimsonshr...@earthlink.net wrote: IE seems to have an issue with the slider control when it is put in a Div with an overflow set to

[jquery-dev] Re: Bug in length property in IE 6.0.*

2009-07-23 Thread John Resig
I checked no plugin is installed for IE 6.0 Did you check on Windows 2000 Professional. I don't have access to that operating system. I'm still leaning towards some sort of external modification going on since there's really no reason for another element to appear when there isn't one on the

[jquery-dev] Re: IE7 + table + trigger + bubbling + colon = EXPLODE

2009-07-23 Thread John Resig
And you can try it in the nightly here: http://code.jquery.com/jquery-nightly.js --John On Thu, Jul 23, 2009 at 9:44 AM, Dave Methvin dave.meth...@gmail.comwrote: I'm having a major issue with JQuery's trigger command. I tend to use custom events, namespaced with colons. I found out today

[jquery-dev] Re: enhancing closest delegation

2009-07-23 Thread John Resig
Brandon mentioned making it so that you could do: $(Something, SomeContext).closest(div); And closest would limit its search to within the context of the original $(...). The problem is that: $(DOMElement, DOMElement) Doesn't work right now (the context is ignored). Thus, we need to make it

[jquery-dev] Re: enhancing closest delegation

2009-07-23 Thread John Resig
A big distinction between the two proposals is if DOMElement is not contained in DOMElementContext: $(DOMEelement,DOMElementContext).closest(body); returns $([]); $(DOMEelement).closest(body,DOMElementContext); returns $(body); I vote for the 2nd argument. In what case would you want to

[jquery-dev] Re: Hide 'n Show Stopper

2009-07-23 Thread John Resig
Is jQuery riddled with bugs in less traveled areas we don't know about? I'm not completely sure what you're talking about. In jQuery 1.3 we changed the logic for detecting if an element was visible or invisible to a much faster algorithm, this affected some pages in the case where a container

[jquery-dev] Re: Bug with :hidden selector and tbody in Internet Explorer

2009-07-23 Thread John Resig
Out of curiosity, does the latest jQuery nightly fix this? http://code.jquery.com/jquery-nightly.js --John On Thu, Jul 23, 2009 at 11:45 AM, Arno Schäfer arno_schae...@gmx.de wrote: Hi, I am experiencing a bug (IMHO) with the :hidden selector in IE. Here is my sample code: script

[jquery-dev] Re: Using .val() with select

2009-07-23 Thread John Resig
Well, it's intentional in that the code explicitly checks .text and .value: this.selected = (jQuery.inArray( this.value, values ) = 0 || jQuery.inArray( this.text, values ) = 0); Although, I'm torn as to if your specific case warrants more merit. It seems odd to me to

[jquery-dev] Re: enhancing closest delegation

2009-07-23 Thread John Resig
In what case would you want to find the closest() match but outside of a context? $( this ).closest(.foo); currently $( this ).context is equal to this Sorry, you misunderstand me - I meant that with your proposed case: $(DOMEelement).closest(body, DOMElementContext); returns $(body);

[jquery-dev] Re: Having valueOf() reflect length of collection - a good idea?

2009-07-23 Thread John Resig
I'm hesitant to add that (I've definitely thought about it, in the past) because .valueOf() doesn't cover all comparison cases. obj obj2 works (as you noted) but if ( obj ) {} doesn't (it always returns true) Additionally, in Firebug, the result shows up as a number rather than something more

[jquery-dev] Re: enhancing closest delegation

2009-07-23 Thread John Resig
I have no specific use case in mind for that particular example. I was thinking of the second closest argument would act like a break statement rather than a search within context. Still, If the context is used to limit the traversal of the closest loop, how would you set the context of raw

[jquery-dev] Re: Bug with :hidden selector and tbody in Internet Explorer

2009-07-23 Thread John Resig
: On Jul 23, 7:32 pm, John Resig jere...@gmail.com wrote: Out of curiosity, does the latest jQuery nightly fix this? http://code.jquery.com/jquery-nightly.js Nope, already tried that. --~--~-~--~~~---~--~~ You received this message because you are subscribed

[jquery-dev] Re: enhancing closest delegation

2009-07-23 Thread John Resig
It will make the specific context required anytime raw nodes are used Hmm... no it won't? $( event.target ).closest(.foo); // will still work, starts at event.target. goes up to documentElement $( event.target, context ).closest(.foo) // starts at event.target, doesn't go higher than context

[jquery-dev] Re: Using .val() with select

2009-07-23 Thread John Resig
Grouping without optgroup. In a (big) select you could have many generic options like select an option, or just -, each with a specific value. By selecting one, the user is given a starting position, closer to the options she might need. Sure, that's reasonable - but I can't imagine

[jquery-dev] Re: Using .val() with select

2009-07-23 Thread John Resig
but that's quite messy imo. On a side note, I'm quite curious to know what the reasonning behind testing the text node against a test *value* was. Oh, and John, you're on fire today, my gmail box is burning because of you ! ;) 2009/7/23 John Resig jere...@gmail.com Grouping without

[jquery-dev] Re: Having valueOf() reflect length of collection - a good idea?

2009-07-23 Thread John Resig
Nope. var obj = { valueOf: function(){ return 0; } }; !!obj true obj.valueOf().constructor Number() It looks like it's returning the number as Number(0) rather than in its primitive form. --John On Thu, Jul 23, 2009 at 5:49 PM, Daniel Friesen nadir.seen.f...@gmail.comwrote: John Resig

[jquery-dev] Re: Bug in length property in IE 6.0.*

2009-07-22 Thread John Resig
, John Resig jere...@gmail.com wrote: Using your demo page I'm getting '3' for both .length and .size() in IE 6 and in Firefox. http://ejohn.org/files/bugs/name-attr/ --John On Tue, Jul 21, 2009 at 9:25 AM, Chirag chiragp...@gmail.com wrote: Hello, Recently when I was doing some testing

[jquery-dev] Re: Rename bind/unbind?

2009-07-22 Thread John Resig
Since jQuery itself is a function, jQuery.bind gives the wrong impression - even though binding jQuery to anything else wouldn't work anyway. You aren't calling jQuery.bind() though, you're calling jQuery(something).bind() - that's a big distinction. You're working against a set of elements -

[jquery-dev] Re: uncaught exception: Node was not found (NS_ERROR_DOM_NOT_FOUND_ERR)

2009-07-22 Thread John Resig
It's an easy enough change. I filed a bug and fixed it: http://dev.jquery.com/ticket/4934 --John On Tue, Jul 21, 2009 at 12:38 PM, vickyb vicky.ble...@gmail.com wrote: Hello, I should start by saying I am fairly new to JQuery so please bear with me, but I would like to share a scenario

[jquery-dev] Re: $.ajax's error callback: Confusion with status codes and dataType

2009-07-22 Thread John Resig
What's the error message that you are receiving? Reading through the code I'd imagine that you would receive a 'parsererror', which seems appropriate. --John On Wed, Jul 22, 2009 at 3:30 PM, Justinvh justi...@gmail.com wrote: Can someone explain me the reasoning that if a dataType is

[jquery-dev] Re: Proposal: New parameter to traversal callbacks

2009-07-22 Thread John Resig
Changing event callbacks would be a critical change. jQuery UI uses trigger with an additional argument everywhere. Yeah, I figured this was the case - definitely my biggest concern, as well. Hmm - may be just a pipe dream. --John --~--~-~--~~~---~--~~ You

[jquery-dev] Re: enhancing closest delegation

2009-07-22 Thread John Resig
Not to mention it would either be broken, or be a complete hack. $(selector, context); is actually an alias for $(context).find(selector); And this.context isn't what was passed to context. I remember the case of $(DOMElement, DOMElement) being discussed recently as an alias for

[jquery-dev] Re: Bug in length property in IE 6.0.*

2009-07-21 Thread John Resig
Using your demo page I'm getting '3' for both .length and .size() in IE 6 and in Firefox. http://ejohn.org/files/bugs/name-attr/ --John On Tue, Jul 21, 2009 at 9:25 AM, Chirag chiragp...@gmail.com wrote: Hello, Recently when I was doing some testing, I found issue with length property.

[jquery-dev] Re: Hide 'n Show Stopper

2009-07-21 Thread John Resig
The ones for .live() http://docs.jquery.com/JQuery_1.4_Roadmap#Events --John On Tue, Jul 21, 2009 at 10:06 AM, mike.helgeson mike.helge...@gmail.comwrote: Which event delegation fixes? On Jul 21, 8:56 am, John Resig jere...@gmail.com wrote: Nope, not yet - we're still landing some good

[jquery-dev] Re: Static regexps

2009-07-20 Thread John Resig
It has less to do with RegExps and more to do with inline objects. You'll note that I also moved inline functions out and declared them above. I'd, eventually, like to do the same with inline arrays and object literals. RegExp, Function, Array, and Objects shouldn't be re-declared on every

[jquery-dev] Re: Static regexps

2009-07-20 Thread John Resig
work, but it seems to me that immutable literals (strings, numbers, regexps) are the first thing I'd cache in a constant. Maybe current interpreters do that already internally ? On Mon, Jul 20, 2009 at 12:56 PM, John Resig jere...@gmail.com wrote: It has less to do with RegExps and more to do

[jquery-dev] Re: Static regexps

2009-07-20 Thread John Resig
No, Chrome last version. With the modern browsers and their JIT engines (Chrome, Safari, FF 3.5) the results to micro-benchmarks are going to be anyone's guess (since they'll be optimized so heavily - it's likely that the results will be at the mercy of the operating system and what else is

[jquery-dev] Re: Hide 'n Show Stopper

2009-07-20 Thread John Resig
This was just discussed the other day - it's already been fixed in the latest builds of jQuery: http://code.jquery.com/jquery-nightly.js --John On Mon, Jul 20, 2009 at 5:11 PM, rickoshay treesp...@gmail.com wrote: I wanted to use jQuery to dynamically hide and show blocks but it is so buggy

[jquery-dev] Re: Proposal: New parameter to traversal callbacks

2009-07-20 Thread John Resig
A quick example: $(.msg).each(function(i, $this){ $(.hide, this).click(function(){ $this.hide(); }); }); I actually proposed this set of changes to Yehuda on IM and then had a back and forth as to how to best implement them. I think they actually hold some promise. I like this since

[jquery-dev] Re: #4919 Add a hoverClass method

2009-07-19 Thread John Resig
You won't be able to use .unbind() to cancel a hoverClass effect, as the event-handling functions are defined inside the hoverClass method. Umm, yes you can. As I said before you can just do: .unbind(mouseenter).unbind(mouseleave) --John

[jquery-dev] Re: IE6 memory leak

2009-07-19 Thread John Resig
On Sat, Jul 18, 2009 at 4:05 PM, John Resig jere...@gmail.com wrote: I'm curious - does the tip outlined in this article help you at all? http://kossovsky.net/index.php/2009/07/ie-memory-leak-jquery-garbage-collector/ --John On Fri, Jul 17, 2009 at 9:06 AM, mharen mha...@gmail.com wrote

[jquery-dev] Re: jQuery API for A grade mobile browsers?

2009-07-18 Thread John Resig
, 12:24 am, John Resig jere...@gmail.com wrote: Andrew - We've thought about this issue a bunch and, unfortunately, there's just not a whole lot that can be successfully removed from jQuery. For example, if we scale back to just using querySelectorAll then all filter() operations

[jquery-dev] Re: #4919 Add a hoverClass method

2009-07-18 Thread John Resig
I think that sounds pretty reasonable. I'll toss it on my todo list, unless someone else wants to tackle it. --John On Sat, Jul 18, 2009 at 9:41 AM, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: What are the odds of implementing this (http://dev.jquery.com/ticket/4919) in 1.3.3 or

[jquery-dev] Re: using optional data arg to $.getJSON with jsonp callback

2009-07-18 Thread John Resig
I understand your point but I think it might work better if the jsre regexp was tweaked, instead: jsre = /=(\?|%3F)(|$)/g Does making the above change work for you? --John On Fri, Jul 17, 2009 at 8:41 PM, Matthew M. Boedicker matth...@boedicker.org wrote: I like passing query string

[jquery-dev] Re: using optional data arg to $.getJSON with jsonp callback

2009-07-18 Thread John Resig
because of $1 being used later on. I tried making the new group jsre = /=(?:\?|%3F)(|$)/g and it worked. Matt On Sat, Jul 18, 2009 at 12:26 PM, John Resig jere...@gmail.com wrote: I understand your point but I think it might work better if the jsre regexp was tweaked, instead: jsre

[jquery-dev] Re: IE6 memory leak

2009-07-18 Thread John Resig
I'm curious - does the tip outlined in this article help you at all? http://kossovsky.net/index.php/2009/07/ie-memory-leak-jquery-garbage-collector/ --John On Fri, Jul 17, 2009 at 9:06 AM, mharen mha...@gmail.com wrote: Has anyone made any progress on this? If you're aspiring stackoverflow

<    1   2   3   4   5   6   7   8   >