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
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).
>
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
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
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
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
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
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
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
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
> 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
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
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
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
.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
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
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
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
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
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
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
//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.
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
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
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
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
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
>> $("") /
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;
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:
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
) 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
>>
>>
>>
>&
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
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
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
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
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
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
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
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
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
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
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
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
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
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");
> 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
--~--~-~--~---
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
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
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
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
>>>
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
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
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
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
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
> >
> >
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
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
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
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
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
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
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
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
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
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
> 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
--~--~-~--~~~---~-
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
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
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
> 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
>
> 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
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
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
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
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
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
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
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
> 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
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
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
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
> 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
> 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
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
> 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
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
> >
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
> 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
> 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
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 () {
>
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
> > 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
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
> 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
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
> 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
> 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
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/
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 - 100 of 1010 matches
Mail list logo