[jQuery] Reducing unnecessary selector lookups

2007-02-08 Thread jgrucza
So right now I have a bunch of jQuery code in a javascript file that I include on every page. I'd like to separate out the jQuery calls a bit so that only the ones relevant to each page are called. I think all the work of looking up non-existent selectors must be slowing our site down. Is

Re: [jQuery] simple selector with ID doesn't work anymore

2007-01-25 Thread jgrucza
I have a somewhat similar problem with ID selectors, and I posted a message about it and a bug but so far I haven't gotten a single response from anyone (here's the bug: http://jquery.com/dev/bugs/bug/881/). My problem is IDs preceded by a class or another ID (i.e. .myClass #myId or #firstId

[jQuery] I'm so confused...

2007-01-25 Thread jgrucza
ideas, Jennifer jgrucza wrote: So I'm getting this error message: ret[ret.length - 1] has no properties being thrown from this line in the jquery source: if ( m[1] == # ret[ret.length-1].getElementById ) { for certain selectors, namely when I have an id preceded by a class

Re: [jQuery] Changing a browser's starting page

2007-01-25 Thread jgrucza
That would be a nightmare if sites could willy nilly change users' start pages. I'm pretty sure there's no way to do this or all the evil spammers in the world would have already done so, right? Jennifer Gerry Danen wrote: Looking through the docs, I'm not sure that jQuery can do this, but

Re: [jQuery] simple selector with ID doesn't work anymore

2007-01-25 Thread jgrucza
simply declare the id that you wish to target hth On 25/01/07, jgrucza [EMAIL PROTECTED] wrote: I have a somewhat similar problem with ID selectors, and I posted a message about it and a bug but so far I haven't gotten a single response from anyone (here's the bug: http://jquery.com/dev

Re: [jQuery] simple selector with ID doesn't work anymore

2007-01-25 Thread jgrucza
Actually it was my problem, not Giuliano's. And I failed to mention an important fact, that I only get the error when my HTML does not include the element I'm selecting for. Also it has gotten weirder, because now I'm getting the same error with previous versions of jQuery, even though I know I

Re: [jQuery] simple selector with ID doesn't work anymore

2007-01-25 Thread jgrucza
/25/07, Olaf Bosch [EMAIL PROTECTED] wrote: jgrucza schrieb: Yeah I know that, but consider this situation: Two different kinds of pages each have an element with the same ID. I want my Javascript to only affect the element on one of those pages. So I precede the ID with the class name

Re: [jQuery] simple selector with ID doesn't work anymore

2007-01-25 Thread jgrucza
expect nothing to happen because nothing matches the selector, but instead I'm getting an error.) Olaf wrote: jgrucza schrieb: Yeah I know that, but consider this situation: Two different kinds of pages each have an element with the same ID. I want my Javascript to only affect the element

Re: [jQuery] simple selector with ID doesn't work anymore

2007-01-25 Thread jgrucza
Hooray! So glad it's reproducable. I had previously entered a bug here: http://jquery.com/dev/bugs/bug/881/ Jennifer On Jan 25, 2007, at 4:56 PM, Aaron Heimlich wrote: The error occurs when the *first* ID selector doesn't exist. See my test page for an example: Ah, yes! You are

Re: [jQuery] ret[ret.length - 1] has no properties

2007-01-24 Thread jgrucza
I've submitted a bug report: #881. jgrucza wrote: So I'm getting this error message: ret[ret.length - 1] has no properties being thrown from this line in the jquery source: if ( m[1] == # ret[ret.length-1].getElementById ) { for certain selectors, namely when I have

[jQuery] ret[ret.length - 1] has no properties

2007-01-23 Thread jgrucza
So I'm getting this error message: ret[ret.length - 1] has no properties being thrown from this line in the jquery source: if ( m[1] == # ret[ret.length-1].getElementById ) { for certain selectors, namely when I have an id preceded by a class or another id, for example:

Re: [jQuery] in 1.1.1, get(0) returns the document when it shouldn't be returning anything!

2007-01-23 Thread jgrucza
Well in my case I wasn't passing any context in, but if the same code applies to both cases, I'll take your word for it. Glad to see it has been fixed. Jennifer Klaus Hartl wrote: bander wrote: But after upgrading to 1.1.1, I got an error saying focus() wasn't a method. So I added a

Re: [jQuery] Using xpath: can't find relative href

2006-09-02 Thread jgrucza
Dave Methvin wrote: In all browsers, or just IE? That's a quirk of IE that it changes relative URLs to absolute. http://www.glennjones.net/Post/809/getAttributehrefbug.htm I thought there was a getAttribute(,2) fix in jQuery for this already. Hi Dave. I got the same behavior in