[jQuery] Re: Unexpected $(document).ready() behavior when jQuery is loaded after the page

2009-10-26 Thread Michael Geary
If that's true, shouldn't my test case fail in Firefox? http://mg.to/test/jquery/dynamic-nightly/jquery-dynamic-onload.html The page does use a nightly from several weeks ago and I haven't tested with a more recent version - but hopefully it hasn't gotten broken since then. -Mike On Mon, Oct 26

[jQuery] Re: Variable within document ready... where is it in the DOM?

2009-10-24 Thread Michael Geary
The concept you're looking for is called a "closure". Search for: javascript closure and you will find all sorts of information about closures. It really has nothing to do with jQuery or the DOM. Closures are part of the core JavaScript language and work in any environment where JavaScript is im

[jQuery] Re: jquery disturbing the others javascript ...

2009-10-23 Thread Michael Geary
Post a link to a test page that illustrates the problem. Otherwise we can only guess as to what might be wrong. You get one guess for free, though. :-) Do you have code on your site that uses Prototype or a similar library, e.g. var foo = $('someElementId').tagName; That will fail if you includ

[jQuery] Re: what does this selector mean ?

2009-10-18 Thread Michael Geary
r, [context]) > // (which is just equivalent to: $(content).find(expr) >} else > return jQuery( context ).find( selector ); > > On Oct 18, 2:05 am, Michael Geary wrote: > > $('div',this) is simply a confusing way of writing $(this).find('div').

[jQuery] Re: what does this selector mean ?

2009-10-17 Thread Michael Geary
$('div',this) is simply a confusing way of writing $(this).find('div'). The only reason it exists at all is for "historical reasons": it was added to jQuery before the .find() method existed. Never use $('div',this) in your code. Always use $(this).find('div') instead. It is easier to read and fas

[jQuery] Re: jQuery speed seems slow

2009-10-14 Thread Michael Geary
On Wed, Oct 14, 2009 at 3:48 PM, James wrote: > Unless your DOM tree is huge and you're trying to select something > massive in one go, the performance difference between a simple jQuery > ID selector (e.g. $("#myID")) vs. a native getElementById selector > should be very negligible, because jQue

[jQuery] Re: What causes a query stri ng when requesting jQuery? e.g. /jquery-1.3.2 .min.js?_=12553…

2009-10-13 Thread Michael Geary
Bob, there's something you're not telling us, and that something is in the test page you haven't posted. ;-) If I understand what you've described so far, it is truly impossible. So either I misunderstood you or you've left out a key detail. My understanding of what you've said is: * You're load

[jQuery] Re: How to access iframe window?

2009-10-13 Thread Michael Geary
.contentWindow is not IE-only. I've used it in all modern browsers for the last 2-3 years. Here's a test someone ran on it a few months ago: http://www.bennadel.com/index.cfm?dax=blog:1592.view If you have an IFRAME DOM element, then element.contentWindow will work fine. Your $('iframe')[i] sho

[jQuery] Re: Unable to download jquery

2009-10-13 Thread Michael Geary
You are trying to *run* jquery-1.3.2.min.js on your Windows box. The error message you're getting is from Windows Script Host [1], which executes JavaScript files that you run directly on Windows. jQuery is not a program that you install or run on your PC. Instead, you include it in a web page usi

[jQuery] Re: AutoHeight IFrame

2009-10-13 Thread Michael Geary
Did you see this note at the top of the top of the jQuery iFrame Sizingpage: *Note:* Due to browser security limitations related to > cross-site scripting , > this solution works only for > iframe

[jQuery] Re: Display fails when jQuery.js isn’t ca ched. When cached, page displayed OK.

2009-10-13 Thread Michael Geary
You may be mistaking cause and effect. The ?_=1255309685187 query string isn't a token to specify how long something should be cached. It's a random number used as a "cachebuster" when jQuery makes an Ajax request. Adding the random number to the URL makes it a different URL each time, so the brow

[jQuery] Re: What causes a query stri ng when requesting jQuery? e.g. /jquery-1.3.2 .min.js?_=12553…

2009-10-12 Thread Michael Geary
This doesn't make any sense. You have a tag that loads jQuery: