Hi everyone,I'm busy designing a new website and want to include some jQuery elements. I'm pretty new to jQuery however I'm able to get it working in all browsers except for IE.This is what I have done: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Untitled Document</title> <link href="css/layout_MouseOverSlide.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="js/jquery.js"></script><script type="text/javascript" src="js/MouseOverSlide.js"></script> </head> <body> <div id="commercials"><div id="commercials_button"><ul id="commercials_slider_content"> <li class="commercials_slider_text"><a href="commercials.php"><img src="images/commercials_out.jpg" border="0" title="Radio and TV Commercials" /></a></li></ul></div> </body></html> HTML: This is the jQuery script: $(document).ready(function(){ var thumbs = $("ul li img"); for (var i = 0, ii = thumbs.length; i < ii; i++){ if (thumbs[i].title && thumbs[i].title.length > 0) { var imgtitle = thumbs[i].title; $(thumbs[i]).wrap('<div class="wrapper" />'). after('<div class=\'caption\'>' + imgtitle + '</div>'). removeAttr('title'); } } $('.wrapper').hover( function(){ $(this).find('img').animate({opacity: ".5"}, 300); $(this).find('.caption').animate({top:"-140px"}, 300); }, function(){ $(this).find('img').animate({opacity: "1.0"}, 300); $(this).find('.caption').animate({top:"140px"}, 100); } ); }); Code (markup):
Learning how to debug is a must. If you know how to debug properly then it will save you loads of head banging against the wall. http://msdn.microsoft.com/en-us/library/ie/gg699336(v=vs.85).aspx
I understand debugging is a must but I can't find a way to do it... Internet Explorer doesn't run on Mountain Lion OS. Does anyone have an idea how to tackle this? Thanks!
You have to be able to run all the browsers you want your site to work in. If you're running Apple, you'll have to dual boot Windows and run IE. You should also be running Opera, Chrome, Safari and Firefox - in at least both operating systems (since they run differently in each). And if you want Linux users to see your site the way you want it seen you should also be running Linux. That will solve all your "it doesn't look right in this browser in that OS" problems.
opacity is css3 and not working in IE at all , how ever there is a code you can fadein and out the element with . but not via animate . whats your exact problem buddy?