1.is(':visible')
2//Selects all elements that are visible.
3
4if($('#yourDiv').is(':visible')){
5 //do stuff in here
6}
7//or
8$('#yourDiv:visible').callYourFunction();
1.is(':visible')
2//Selects all elements that are visible.
3
4if($('#Div').is(':visible')){
5 // add whatever code you want to run here.
6}
7
8$('#yourDiv:visible').callYourFunction();
1// Checks CSS content for display:[none|block], ignores visibility:[true|false]
2$(element).is(":visible");
3
4// The same works with hidden
5$(element).is(":hidden");
1// Checks css for display:[none|block], ignores visibility:[true|false]
2$(element).is(":hidden");
3