[jquery-dev] Re: [BUG]val() ignores the value attribute?

2009-05-26 Thread John Resig
I don't think so - I've updated the documentation to be a little more precise. http://docs.jquery.com/Attributes/val --John On Tue, May 26, 2009 at 3:26 PM, Alex Farcas wrote: > > I noticed val() ignores the 'value' attribute on html elements. > > If i have this markup: > < div id="test" value

[jquery-dev] Re: Error "jQuery.event.specialAll[type].teardown.call(elem, namespaces);"

2009-05-28 Thread John Resig
Do you have a page that we can view to reproduce the problem? (That would help a lot) Otherwise, do you have a stack trace from where the bug is occurring? --John On Thu, May 28, 2009 at 12:00 AM, Bob wrote: > > Hi, > I have recently upgraded from jQuery 1.2 to the current latest > (1.3.2). >

[jquery-dev] Re: Adding SVG class (className) support to jQuery

2009-05-30 Thread John Resig
David - It'd be good to file a ticket on the issue and add in your patch and a link back to this discussion: http://dev.jquery.com/newticket How well have you tested the change across browsers? Does changing .className to .getAttribute/setAttribute("class") have any other ramifications? It's def

[jquery-dev] Re: Proposal: All setters take functions

2009-06-03 Thread John Resig
I only ask that the jQuery.isFunction(val) results be cached to avoid repeated calls for the function check - but other than that, sounds good. --John On Wed, Jun 3, 2009 at 1:32 PM, Yehuda Katz wrote: > I'd like to submit a patch that lets all setters (val, html, text, etc.) > take a functio

[jquery-dev] Re: Prepare for IE6's death

2009-06-05 Thread John Resig
I can't think of a single thing that we could remove from jQuery that wouldn't also affect IE 7.0. The JavaScript and DOM implementations in IE 6 and 7 are virtually identical - and because of that there's really no reason for us to stop actively supporting IE 6 (at least not until both 6 and 7 ar

[jquery-dev] Re: Strange jQuery misbehavior in a quite crowded environment

2009-06-09 Thread John Resig
A newer one may help you - but it's very likely that it's the other, older, libraries that are manipulating the native object prototypes (namely Prototype and Scriptaculous) are the cause of the problem. --John On Tue, Jun 9, 2009 at 6:15 AM, rimmer333 wrote: > > Hello. > > I'm working on a re

[jquery-dev] Re: jqeury selector strangeness — is this a bug or am I doing it wrong?

2009-06-11 Thread John Resig
Hmm, I don't have an explanation, off-hand. Could you file a ticket with your test files attached? Thanks! http://dev.jquery.com/newticket --John On Thu, Jun 11, 2009 at 3:33 PM, morgancodes wrote: > > Hello, > No response to this question on jquery users list or stackoverflow, so > I'm trying

[jquery-dev] Re: Are effects really not supported in IE/Quirksmode?

2009-06-11 Thread John Resig
This is due to the issue where if an element has a height or width equal to 0, in IE in quirksmode, the full height/width of the element is shown. jQuery use to have a fix for this - anytime a value of 0 was set a value of 1 was set instead - unfortunately this caused other strange side-effects wi

[jquery-dev] Re: Better Last-Modified support and added Etag support

2009-06-15 Thread John Resig
That's a great set of patches - thanks! The only minor nit that I see is that you do: jQuery.ajaxSetup({ ifModified: true }); In your tests instead of putting the setting inline in the $.ajax() call (which would probably be preferred, since it'll be less likely to affect other tests). I made the

[jquery-dev] Re: Fwd: AJAX & Etag

2009-06-15 Thread John Resig
It'll be pretty hard to do that since (cross-domain) JSONP uses a completely different means of communicating from the normal Ajax request (creating script tags and letting the scripts load and execute). We have a lot more power when it comes to using XMLHttpRequests and working against a local d

[jquery-dev] Re: $('#Test').val(null); IE vs. the rest

2009-06-16 Thread John Resig
> It's always a good idea to either use a ||'' or cast your data to a string or > other proper datatype when using jQuery, a large number of the methods will > have somewhat undesirable results if you try using null or undefined, it's a > known issue. Oh, I wouldn't go that far. We've patched

[jquery-dev] Re: $('#Test').val(null); IE vs. the rest

2009-06-17 Thread John Resig
antman, Nadir-Seen-Fire) [http://daniel.friesen.name] > > John Resig wrote: >>> It's always a good idea to either use a ||'' or cast your data to a string >>> or other proper datatype when using jQuery, a large number of the methods >>> will have somewhat u

[jquery-dev] Re: $('#Test').val(null); IE vs. the rest

2009-06-17 Thread John Resig
1:39 pm, David Zhou wrote: >> >> >> Checkout the jQuery svn repo, make your changes and generate a diff. >> >> >> -- dz >> >> >> On Tue, Jun 16, 2009 at 11:34 PM, vdhant wrote: >> >> >>> Hey guys >> >>> In

[jquery-dev] Re: Live events and :not

2009-06-18 Thread John Resig
What happens if you try: jQuery('a:not([href*="#"][href*="javascript"]') also - do you have a sample demo page that we can look at? Thanks! --John On Thu, Jun 18, 2009 at 7:55 AM, pbcomm wrote: > > James, > I'm looking for the links that do NOT start with '#' or 'javascript', > and it works o

[jquery-dev] Re: Live events and :not

2009-06-18 Thread John Resig
.com/clients/jquery/livenot.html > > On Jun 18, 8:23 am, John Resig wrote: >> What happens if you try: >> jQuery('a:not([href*="#"][href*="javascript"]') >> >> also - do you have a sample demo page that we can look at? Thanks! >> &g

[jquery-dev] Re: A element click event, event.target.pathname

2009-06-18 Thread John Resig
Unfortunately that would involve changing the property on the DOM object itself, which is something that jQuery doesn't handle. Which element(s) are you working with that have the pathname associated with it? --John On Thu, Jun 18, 2009 at 2:06 PM, pbcomm wrote: > > The pathname property of l

[jquery-dev] Re: [1.2.6] IE6 bug with "+" selector

2009-06-19 Thread John Resig
Hmm, I don't think we're planning on having another update to the 1.2.x branch at this point - but thanks for the heads-up. --John On Fri, Jun 19, 2009 at 5:47 AM, tarini wrote: > I found a bug on jQuery 1.2.6 that has been fixed on 1.3.* > It's about using "plus" in selector but I don't know

[jquery-dev] Re: IE issue with .append?

2009-06-22 Thread John Resig
You say that you still have problems if you split apart the query. So in this case $button.append( "[" ) fails - correct? What happens if you do: $button.append( document.createTextNode("[") ) --John On Mon, Jun 22, 2009 at 2:09 PM, Daniel Friesen wrote: > > I've been having trouble with a

[jquery-dev] Re: certain selectors broken after AJAX replaceChild in FF (and Opera?) -- whose bug?

2009-06-22 Thread John Resig
That's definitely an odd one. Thanks for putting it on my radar, at least. I have it on my todo list and when some time frees up I'll try and poke at it to see what can be done. --John On Mon, Jun 22, 2009 at 2:48 PM, Usman wrote: > > I'm using jQuery 1.3.2 with JBoss RichFaces 3.3.0 and found

[jquery-dev] Re: IE issue with .append?

2009-06-22 Thread John Resig
argument with the > first being a string a "Invalid argument" error is thrown if the first > argument is not a valid node string. If the first argument is a valid > node string, instead the first argument is ignored and the rest are > inserted. > > ~Daniel Frie

[jquery-dev] Re: using find method on a documentFragment attached node

2009-06-22 Thread John Resig
Unfortunately jQuery selectors are not supported on Document Fragments. Fragments are quite feature-poor and don't even provide basic DOM-querying functionality in some browsers. For example the following will return undefined in Firefox 3: javascript:alert(document.createDocumentFragment().getEl

[jquery-dev] Re: IE issue with .append?

2009-06-22 Thread John Resig
//dev.jquery.com/ticket/4806 > > ~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name] > > John Resig wrote: >> This is very helpful analysis. I've added it to my todo list. Could >> you file a ticket with your test cases, as well? Thanks! >> http://dev.jquery.

[jquery-dev] Re: ready event fires only after images are loaded on IE?

2009-06-22 Thread John Resig
Interesting fix, Rich. I've CC'd in Diego who's been doing a lot of work with the ready code lately. --John On Mon, Jun 22, 2009 at 5:53 PM, Rich Dougherty wrote: > > On Feb 7, 11:55 am, Paul Irish wrote: >> I can report that the jquery-2009-01-28.js nightly, with this fix, >> caused IE (6 an

[jquery-dev] Re: IE issue with .append?

2009-06-23 Thread John Resig
k properly across > browsers be accepted? > > That should be something simple like checking if it starts with < and > ends with >, contains no other <>'s and doesn't have a / before the > > then insert a single / before the last > before continuing. &g

[jquery-dev] Re: IE issue with .append?

2009-06-23 Thread John Resig
track down all the > code using that pattern. > > ~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name] > > John Resig wrote: >> I'm hesitant to support that since it tends to promote passing in >> malformed (X)HTML. At least with it's obvious that

[jquery-dev] Re: IE issue with .append?

2009-06-23 Thread John Resig
Yeah, I think all outstanding bugs with that were fixed in 1.3.0. --John On Tue, Jun 23, 2009 at 2:56 PM, Kelvin Luck wrote: > > On Tue, 23 Jun 2009 12:40:11 -0400, John Resig wrote: > >> >> To be clear: jQuery supports the pattern, it just requires the closing

[jquery-dev] Re: IE issue with .append?

2009-06-23 Thread John Resig
k of a single tag > as malformed html. > > ~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name] > > John Resig wrote: >> To be clear: jQuery supports the pattern, it just requires the closing /. >> >> $("") // ok >> $("") /

[jquery-dev] Re: [ANN] jQuery Metadata 2.1

2009-06-23 Thread John Resig
More information about this style of attributes can be found here: http://ejohn.org/blog/html-5-data-attributes/ Great work Yehuda! --John On Tue, Jun 23, 2009 at 3:31 PM, Yehuda Katz wrote: > I just released jQuery Metadata 2.1, which adds support for HTML5 data-*. > Usage: > This > is a p;

[jquery-dev] Re: Ticket no: #4575

2009-06-25 Thread John Resig
Well - if there was any progress it would probably be mentioned in the ticket itself. It doesn't seem like that wouldn't be too hard to fix, I'll look in to it. --John On Thu, Jun 25, 2009 at 9:01 AM, Hak wrote: > > Hi, has there been any developments to the following bug: > > Ticket number:

[jquery-dev] Re: [jQuery] #4820: fallback xhr transport missing in 1.3.2

2009-06-25 Thread John Resig
You can see the default implementation here: http://dev.jquery.com/browser/trunk/jquery/src/ajax.js#L158 --John On Thu, Jun 25, 2009 at 2:29 PM, Etienne Robillard wrote: > Hi flesler, > > Well if you do provide a fallback then please show me the relevant > part in the code cause I didn't find

[jquery-dev] Re: [jQuery] #4820: fallback xhr transport missing in 1.3.2

2009-06-25 Thread John Resig
) to override $.ajaxSettings in > 1.3.2 ? > > Best regards, > Etienne > > > > John Resig wrote: >> You can see the default implementation here: >> http://dev.jquery.com/browser/trunk/jquery/src/ajax.js#L158 >> >> --John >> >> >> >&

[jquery-dev] Re: Frames with jQuery 1.3.2 and Opera

2009-06-25 Thread John Resig
Hmm, I hadn't realized that the bug had been re-opened. It looks like there's another related issue at play. Added to my todo list. --John On Thu, Jun 25, 2009 at 6:18 PM, JohnnyCee wrote: > > I recently updated my product to use jQuery 1.3.2 and I gave beta > testers a version to test. A coup

[jquery-dev] Re: Proposal: error handling for getScript

2009-06-30 Thread John Resig
A patch that implements something like this would be considered seriously. --John On Tue, Jun 30, 2009 at 6:05 AM, Ricardo wrote: > > onerror seems to only work in Firefox. I can only see this implement > for JSONP with a timeout that removes/empties the callback, it's > currently impossible f

[jquery-dev] Re: Sporadic wrong option values, various IE versions with Infopath and OfficeLiveConnector add-ons

2009-06-30 Thread John Resig
Mike - I'm unfamiliar with this particular situation - if you're able to, somehow, duplicate it for us that would be very helpful. --John On Tue, Jun 30, 2009 at 7:40 PM, Mike Gale wrote: > > I have a web site that uses jQuery to populate and manipulate drop > down lists (option lists). > > T

[jquery-dev] Re: bindReady on Safari when dynamically loaded ...

2009-07-01 Thread John Resig
Yeah, this was intentional - since Safari now has a decent DOM ready technique, we switched to that. To be clear: It's not possible to run the ready event if jQuery is dynamically loaded in any browser that uses .addEventListener( "DOMContentLoaded" ... ). Well, at least, can't detect it using t

[jquery-dev] Re: Proposal: Improved CSS naming, markup for qUnit.

2009-07-02 Thread John Resig
All of these points sounds very reasonable to me. Making these changes to the markup will require some changes to our tests (since some IDs are referenced by name) but this is a change that would be acceptable to make. Looking forward to your patch! --John On Thu, Jul 2, 2009 at 1:55 PM, brav

[jquery-dev] Re: Documentation error

2009-07-05 Thread John Resig
Good call, fixed. --John On Sun, Jul 5, 2009 at 1:32 PM, Gregor wrote: > > I would like to point out a documentation error on wiki page: > http://docs.jquery.com/Utilities/jQuery.grep#arraycallbackinvert > > The Order of arguments in the argument section is switched: function > callback(indexI

[jquery-dev] Re: Status of $.browser

2009-07-06 Thread John Resig
Re-wording the documentation from 'deprecated' to 'strongly discourage the use of' (or something similar) might be ok. I'm not sure what else we can do on our end - we already link to a number of guides that provide good information on the subject matter. As to the linked Stack Overflow discussio

[jquery-dev] Re: Proposal: Display CSS property shouldn't always set to Block

2009-07-11 Thread John Resig
We already attempt to do this, internally, If we encounter an element that we need to show we create a temporary one and figure out the display type of that element (and use that, instead). It should be noted that animating the height or width of a table, in general, is a bad idea (they behave str

[jquery-dev] Re: bug in 1.3.3pre version of attr()

2009-07-11 Thread John Resig
Good catch - and thanks for the patch! I just landed the improvement: http://dev.jquery.com/ticket/4884 I made one minor tweak to the patch: In the case where .attr("name", function(){}) occurs the jQuery.isFunction(value) check is cached (rather than occurring at every iteration in the array). T

[jquery-dev] Re: Better Last-Modified support and added Etag support

2009-07-11 Thread John Resig
Lawrence - So it appears as if your patch doesn't work in Opera (the tests you committed fail in Opera 9.6 and hang in Opera 10). Do you have any insight into this? --John On Mon, Jun 15, 2009 at 3:53 AM, lawrence.pit wrote: > > Hi All, > > I've created a patch + tests that improves support f

[jquery-dev] Re: Sandboxed Compatibility

2009-07-14 Thread John Resig
As we discussed on IM, the parent.document || part would be untennable (since it would make all iframed copies of jQuery incapable of operating within the frame itself). Would the resulting change, (function(document){ })(document); be acceptable? --John On Tue, Jul 14, 2009 at 11:32 AM, An

[jquery-dev] Re: Better Last-Modified support and added Etag support

2009-07-14 Thread John Resig
So I refused to believe that such a massive bug actually existed. I did some digging and built a test case: http://ejohn.org/files/bugs/modified/ http://ejohn.org/files/bugs/modified/headers.phps Sure enough, there's a complete failure. Opera <= 9.6 are incapable of doing .setRequestHeader("If-Mo

[jquery-dev] Re: Better Last-Modified support and added Etag support

2009-07-14 Thread John Resig
I've committed the changes that I mentioned, here: http://dev.jquery.com/changeset/6432 The test suite is now passing in all browsers (save Opera 10b1, which has issues with :enabled/:disabled). --John On Tue, Jul 14, 2009 at 5:00 PM, John Resig wrote: > So I refused to believe tha

[jquery-dev] Re: Proposal: $("'text") for $(document.createTextNode(text))

2009-07-14 Thread John Resig
Well, you could also do: $("h1").prepend("§"); The reasoning behind handling selectors (and HTML) in $(...) and then later appending/prepending/etc. them into the document is that you can modify them in the interim. For example: $("Something").click(function(){ }).prependTo("div.section");

[jquery-dev] Re: Proposal: $("'text") for $(document.createTextNode(text))

2009-07-14 Thread John Resig
> So I guess you're saying that there shouldn't be a need to work with > text nodes, so no shortcut is necessary. Fair enough. Yeah, I'm open if some interesting use cases are proposed but for now I'm hesitant to add new syntax/parsing to $(...) for minor benefit. --John --~--~-~--~---

[jquery-dev] Re: Sandboxed Compatibility

2009-07-14 Thread John Resig
nd change sent parameter at the end ... too easy! > > Best Regards > > On Jul 14, 2009 8:36 PM, "John Resig" wrote: > > As we discussed on IM, the parent.document || part would be untennable > (since it would make all iframed copies of jQuery incapable of operating

[jquery-dev] Re: wrap(), wrapAll(), wrapInner()

2009-07-14 Thread John Resig
Filed and fixed: http://dev.jquery.com/ticket/4902 http://dev.jquery.com/changeset/6434 --John On Tue, Jul 14, 2009 at 7:01 PM, David Flanagan wrote: > > If the argument to a wrap function is a string that contains text, it > doesn't do what I'd expect it to. > > For example: $("h1").wrap("\u0

[jquery-dev] Re: more about wrap() methods

2009-07-14 Thread John Resig
This one was tricky because we've never explicitly said *not* to use multiple elements in wrap, just that you should have one. There were two options: - Ignore the remaining elements (as you suggested) and possibly break some unknown code. - Create a new case where .pushStack is used, potentially

[jquery-dev] Re: Sandboxed Compatibility

2009-07-15 Thread John Resig
tomorrow during lunch break. >> >> Cheers >> >> >> On Wed, Jul 15, 2009 at 12:19 AM, John Resig wrote: >> >>> Cool - could you file a bug along with a patch to src/intro.js >>> src/outro.js? Thanks! >>> >>> --John >>>

[jquery-dev] Re: Sandboxed Compatibility

2009-07-15 Thread John Resig
s file then to make window replacement >> available. >> >> document = window.document, >> >> is that OK? >> >> >> On Wed, Jul 15, 2009 at 12:28 AM, Andrea Giammarchi < >> andrea.giammar...@gmail.com> wrote: >> >>> Not now (I a

[jquery-dev] Re: Help with jQuery.event.trigger

2009-07-15 Thread John Resig
Why not make sure that the e.target is equal to the active element before re-firing the event? if ( e.target === this ) { // your code } --John On Wed, Jul 15, 2009 at 3:39 PM, Jeffrey Kretz wrote: > > I hate to bump this, but I haven't yet been able to figure out a solution > -- > I'm hopin

[jquery-dev] Re: Bug with built-in effects and CSS float

2009-07-15 Thread John Resig
Pete - Does it work with the jQuery nightlies? We made some tweaks to how :hidden/:visible worked in 1.3 and have since made some more changes to hopefully fix bugs. http://code.jquery.com/jquery-nightly.js --John On Wed, Jul 15, 2009 at 3:28 PM, Pete Schwamb wrote: > > I just spent a few hou

[jquery-dev] Re: jquery live not receiving data

2009-07-16 Thread John Resig
Hmm - which nightly are you running? That change appears in the source for me. http://code.jquery.com/jquery-nightly.js --John On Wed, Jul 15, 2009 at 9:31 PM, jnunemaker wrote: > > Ticket #4532 (Live event handlers don't receive custom event data) is > closed but I just downloaded nightly and

[jquery-dev] Re: jquery live not receiving data

2009-07-16 Thread John Resig
I'll try out the one you linked to. I'm sure that will get me > going. > > On Jul 16, 10:14 am, John Resig wrote: > > Hmm - which nightly are you running? That change appears in the source > for > > me.http://code.jquery.com/jquery-nightly.js > > > >

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

2009-07-17 Thread John Resig
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 will fail (since qSA doesn't provide a means of filtering, only

[jquery-dev] Re: jQuery UI 1.7.2 - Opera(9.63) issue with Form submitting through a dialog .

2009-07-17 Thread John Resig
This may possibly be a jQuery UI issue, you should post your question to the jQuery UI list: http://groups.google.com/group/jquery-ui --John On Fri, Jul 17, 2009 at 11:07 AM, vrn_shan wrote: > > We are using jQuery 1.3.2 and jQuery UI 1.7.2 in our project. > > Everything was working perfect ti

[jquery-dev] Re: datepicker error

2009-07-17 Thread John Resig
You should send this message to the jQuery UI mailing list: http://groups.google.com/group/jquery-ui --John On Fri, Jul 17, 2009 at 1:22 PM, sankofa wrote: > > I am a jQuery newbie and have applied a jQuery datepicker and form > validation to several pages. The validation is working as expect

[jquery-dev] Re: Namespaced Events bubbling - is it supported?

2009-07-17 Thread John Resig
A couple quick points - First, it seems like you're using the namespaces backwards. Normally you would do 'init.collapsable', 'expand.collapsable', etc. (thus you would be able to remove all the init events in the collapsable namespace, for example). If you could make a demo page demonstrating th

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

2009-07-18 Thread John Resig
ing the jQuery API? I realize, no Devo hat for a logo. ;-) > > > On Jul 18, 12:24 am, John Resig wrote: > > Andrew - > > > > We've thought about this issue a bunch and, unfortunately, there's just > not > > a whole lot that can be successfully removed

[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

[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 stri

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

2009-07-18 Thread John Resig
n the url 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 wrote: > >> I understand your point but I think it might work better if the jsre >&g

[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 wrote: > > Has anyone made any progress on this? If you're aspiring stackoverflow > users, you mig

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

2009-07-18 Thread John Resig
As it stands we don't provide an explicit way to remove .hover() events. They can be removed using .unbind("mouseenter/mouseleave") - which is what would need to happen here, as well. It's a good point - but I'm not hugely concerned. --John On Sat, Jul 18, 2009 at 7:42 PM, Már wrote: > > > I

[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
js --John On Sat, Jul 18, 2009 at 4:05 PM, John Resig 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

[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 function

[jquery-dev] Re: Static regexps

2009-07-20 Thread John Resig
erent interpreters 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 wrote: > >> It has less

[jquery-dev] Re: Static regexps

2009-07-20 Thread John Resig
> I ran it around 15 times and the winner changes radically, both yield > random numbers between 40-80 in Chrome. Non-caching seems to win most of > the time but with the change rate, the numbers don't seem reliable. > I assume you're talking about Internet Explorer 6? You need to use a copy that

[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 wrote: > > I wanted to use jQuery to dynamically hide and show blocks but it is > so buggy that we had to r

[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: Hide 'n Show Stopper

2009-07-21 Thread John Resig
Nope, not yet - we're still landing some good patches. If I can get the event delegation fixes in, perhaps sooner. --John On Tue, Jul 21, 2009 at 7:46 AM, aHeckman wrote: > > John, any idea when 1.3.3 will drop? > > On Jul 20, 10:32 pm, John Resig wrote: > > This was j

[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 wrote: > > Hello, > > Recently when I was doing some testing, I found issue with length > property. The size() method

[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 wrote: > > Which event delegation fixes? > > On Jul 21, 8:56 am, John Resig wrote: > > Nope, not yet - we're still landing some good patches. If

[jquery-dev] Re: Chrome not recognizing multiple selectors?

2009-07-22 Thread John Resig
I did some digging and I can confirm your issue. It's happening in both Safari 4 and Chrome 2 (they both use WebKit). Here's a reduced case: http://ejohn.org/files/bugs/qsa-nth/ It seems to only happen in the case of :nth-child (I haven't been able to duplicate it with other selectors, yet). I'm n

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

2009-07-22 Thread John Resig
lt but incorrect > count 4. > There are only three elements with attribute "name" butI still get 4 > count. > However, the same works fine in IE 7 & 8. > Please note that I have IE 6.0.* installed on Windows 2000 Professional > Edition operating system. > > Thank

[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 eleme

[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 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 with you all in the

[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 wrote: > > Can someone explain me the reasoning that if a dataType is specified > as JSON and

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

2009-07-22 Thread John Resig
ata inside, or is this > logic that should be handled as a case in dataFilter? > > On Jul 22, 3:17 pm, John Resig wrote: > > What's the error message that you are receiving? Reading through the code > > I'd imagine that you would receive a 'parsererro

[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 re

[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 $(DOME

[jquery-dev] Re: Ticket #4946, jQuery.isObject

2009-07-23 Thread John Resig
I'll rope Yehuda in to see if he can explain it. --John On Thu, Jul 23, 2009 at 4:18 AM, Balazs Endresz wrote: > > It has been marked as invalid and suggested to bring it up here: > http://dev.jquery.com/ticket/4946 > > > --~--~-~--~~~---~--~~ You received this

[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 th

[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 wrote: > > > I'm having a major issue with JQuery's trigger command. I tend to use > > custom events, namespaced with colons. I found out today that certain > >

[jquery-dev] Re: enhancing "closest" delegation

2009-07-23 Thread John Resig
follow. What does "make the above .closest() context change" mean? > > Jörn > > On Thu, Jul 23, 2009 at 5:12 AM, John Resig wrote: > > > >> Not to mention it would either be broken, or be a complete hack. > >> > >> $(selector, context); is actually an

[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

[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 el

[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 wrote: > > Hi, > > I am experiencing a bug (IMHO) with the :hidden selector in IE. Here is > my sample code: > > > $(function () { >

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

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 ha

[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); retur

[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 u

[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

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

2009-07-23 Thread John Resig
t; > On Jul 23, 7:32 pm, John Resig 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 bec

[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 co

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

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 imag

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

2009-07-23 Thread John Resig
value 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/

[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 wrote: > > Jo

  1   2   3   4   5   6   7   8   9   10   >