[jQuery] Re: IE problems with prepend since 1.2.3?
To reply to my own befuddlement to maybe help others wrestling with IE, prepending something to the page's title doesn't work. Calling a function that prepended information from the JSON into the title tag was failing, and causing subsequent functions to fail. So, it wasn't version 1.2.3, but it is a quirk of jQuery that you can't modify the title tag. It could go wider than the title tag and include anything in the head, but I've not tested that scenario yet. And I say quirk of jQuery because I've found a wrong-around using straight javascript for now. -jody
[jQuery] IE problems with prepend since 1.2.3?
IE6 and IE7 since upgrading to jQuery 1.2.3 is targeting line 264 in the jquery.js (uncompressed) with the error message, Unexpected call to method or property access. Here's the bit in jQuery it's referencing: prepend: function() { return this.domManip(arguments, true, true, function(elem){ if (this.nodeType == 1) this.insertBefore( elem, this.firstChild ); }); }, Specifically line 264 is claimed to be the culprit: this.insertBefore( elem, this.firstChild ); . Per usual, Firefox, Safari, and Opera work fine. It could well be my code that's triggering my latest battle with IE, but I thought I'd at least ask here. I've spent the last 2-3 hrs or so refactoring, etc. to see if messy code was causing the problem, but no luck. I consistently get this same error from the MS script debugger. Maybe this is something someone else has run into, if so, any help is appreciated. Thanks, jody
[jQuery] Re: IE problems with prepend since 1.2.3?
Actually, I jumped the gun too soon I found out after more testing today. Elements are being prepended fine--the MS debugger is giving a false error. Instead, what's happening is IE doesn't like my ajaxStop call for whatever reason (well, it's likely a race condition that IE stumbles over but other browsers handle, but still a race condition that needs fixing). So now I'm off to debug that. Again, the culprit is more likely my code not jQuery. -jody
[jQuery] Re: change in jQuery.grep in 1.2.3?
Thanks, Karl, for the clarification.
[jQuery] Re: Loading animation when waiting JQuery.post() to return
I think what you might be after are ajaxStart and ajaxStop: http://docs.jquery.com/Ajax/ajaxStart#callback http://docs.jquery.com/Ajax/ajaxStop#callback That could start and then stop something like an animated gif that would overlay the page until the ajax request was finished. Getting the animation, styling it, etc. is all just css and usual hide/show, etc. -jody
[jQuery] (this).next problem
hi all, I'm new to the list and new to jQuery, so I hope you can bear with me. I'm having a problem getting a specific div to hide without hiding similarly classed divs. The HTML looks something like this: div class=device_header h2Device Name/h2 ul lispan class=collapse_device_spana class=collapse_device-/ a/span /li /ul /div div class=device_content ---Device Information--- /div The jQuery I'd like to use looks like this: $('.collapse_device').click(function(){ $(this).next('.device_content').hide() }); If I write it as: $('.collapse_device').click(function(){ $('.device_content').hide() }); That works, but closes all the .device_content classes on the page and there could be, depending on the view, anywhere from 1-20 or more .device_content classes on the page. So, what am I doing wrong with (this).next and/or is there a better way to do what I'm trying to do? I've read around in the forums here and tried different methods but none seem to get at this exact problem. I've deduced that it may be to do with next requiring siblings--but I can't find clear documentation on just how strictly jQuery interprets the word sibling--if strictly, e.g. anchors are only siblings of anchors, then I can see the problem in that an anchor can't recognize the .device_content div as its sibling. But then I wonder if I'm thinking too hard about it? Thanks in advance, jody