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. Link to comment https://forums.phpfreaks.com/topic/191834-check-if-something-is-visible-in-jquery-ui/ 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 } Link to comment https://forums.phpfreaks.com/topic/191834-check-if-something-is-visible-in-jquery-ui/#findComment-1011466 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.