0

IE 8 says: it doesn't support this property or method:

Code is here (Error in coming in this whole part):

$('li').has('ul').mouseover(function(){
    $(this).children('ul').css('visibility','visible');
}).mouseout(function(){
    $(this).children('ul').css('visibility','hidden');
})

This code is a part of this function:

if ($.browser.msie && $.browser.version.substr(0,1) < 7) {
    $('li').has('ul').mouseover(function(){
        $(this).children('ul').css('visibility','visible');
    }).mouseout(function(){
        $(this).children('ul').css('visibility','hidden');
    })
}

What is wrong with this.. please help.

6
  • 1
    Does it occur when you mouseover or when you run the code? Commented Nov 28, 2012 at 6:50
  • That's not where the error is coming from. Commented Nov 28, 2012 at 6:51
  • The error shows in IE8 only.. when document is loaded.. I get "Done, but with error" at the bottom of IE8.. when I start IE8 Debugger, it points me to that code Commented Nov 28, 2012 at 6:58
  • if the browser is IE8 as you have mentioned in question title, the inside code will never be executed-- as you have put the condition "$.browser.msie && $.browser.version.substr(0,1) < 7" Commented Nov 28, 2012 at 7:00
  • it may not be executed.. but IE debugger showing error :).. it debugs whole script.. no matter if it for him or not :) Commented Nov 28, 2012 at 7:02

1 Answer 1

1

I am not sure but small correction use $('li ul') instead of $('li').has('ul')

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.