views:

56

answers:

1

Hey there,

these two selectors is not working in Internet Explorer 8 (they work okay in Firefox, Safari and Chrome).

$(this.children).stop().animate({ color: "#4B2B26" }, 300);
$(this).find('a').stop().animate({ color: "#4B2B26" }, 300);

Help is appreciated, thanks!

edit; I think it's a problem with jquery.js.. Each time i hover a object the debugger trows out; "Invalid Argument, Jquery.js line 137 Code 0".

now i have;

$("a", this).stop().animate({ 'color': '#CEEAE6' }, 300); 

also NOT working in IE.

BUT this one is working fine in IE;

$("h3", this).stop().animate({ 'border-bottom': '5px solid #CEEAE6' }, 0);
+1  A: 

No idea about the second rule, but for the first rule can you try this:

$(this).children().stop().animate({ color: "#4B2B26" }, 300);

.children() is a jQuery method, thus browser independent. "this.children" returns the children property of whatever "this" is at that moment. Don't know if that is even a supported property for a DOM element in IE. Using "this.childNodes" might also do the trick here but probably also not browser independent...

Koen
@ TomGrohl; IE8 is giving "Invalid Argument, Jquery.js line 137 Code 0". I didn't change the default jquery file.@Koen; Tried that one allready, it's not working in all browsers.
Jeroen
Okay.. Koen suggested the good thing.. i forgot to add () after children. But it's still not working in IE. :S
Jeroen
I've updated my answer. Not sure it that would solve your problem.
Well then I guess that your current object (this) is not a DOM element for some reason in IE. If you have IE8, you can use the built in debugger to check out the object type (http://blogs.msdn.com/b/jscript/archive/2008/03/13/jscript-debugger-in-internet-explorer-8.aspx).
Koen
Updated my post...
Jeroen
What version of jQuery is it?