Spring Posted July 31, 2011 Share Posted July 31, 2011 Hey, I'm new to Jquery and I'm wondering what my mistake is here, it's working fine with JS! Js code: function mouseOver(){ var oWrap = document.getElementById('wrap'); oWrap.style.backgroundColor = "#FFFFFF"; oWrap.style.filter = "alpha(opacity=100)"; oWrap.style.opacity = 1.0; } And here's the Jquery: $('#wrap').mouseover(function (){ $(this).css({ 'background-color':'#FFFFFF', 'filter':'alpha(opacity=100)', 'opacity ':'1.0' }); }); Quote Link to comment Share on other sites More sharing options...
nogray Posted July 31, 2011 Share Posted July 31, 2011 In JQuery, you wouldn't need to set the filter style (jquery will do it for you). Other than that, the code looks correct. Make sure to include it when the document is ready. Quote Link to comment Share on other sites More sharing options...
AyKay47 Posted August 1, 2011 Share Posted August 1, 2011 the only thing that I see here is that you include a space in the opacity quotations.. what is actually going wrong here? simply not working when you mouseover? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.