mapleleaf Posted February 12, 2010 Share Posted February 12, 2010 I am using jquery ui and need to check if an element is visible. Normally if (document.getElementById("bonuses").style.display = "none") { //do whatever } would be what I need but the function runs regardless of whether the element is displayed or not. Using jquery ui slider Basically how do I check to see an elements style status in jquery? In this case it might be position or opacity that is being altered but somehow I can't check the elements style. Any help much appreciated. Quote Link to comment Share on other sites More sharing options...
mapleleaf Posted February 12, 2010 Author Share Posted February 12, 2010 Got the solution elsewhere Here for anyone who might be looking is(':visible') ) was the magic needed. if( $('#bonuses').is(':visible') ) { // it's visible, do something } 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.