Bootstrap check modal shown hidden


Bootstrap check modal shown hidden– We can check whether the bootstrap modal is shown or hidden using jQuery. Here in this article we are going to explain how to check whether the modal is shown or hidden in Bootstrap.


Bootstrap check modal shown hidden | JavaScript | jQuery Example

Using jQuery you can check that modal has in class or not-

|Bootstrap check modal shown hidden Example:

<script>
var isModelOpen = $('#myModal').hasClass('in');
if(isModelOpen){
alert("Modal is Open");
}else{
alert("Modal is Closed");
}
</script>

So using the above java script you can check whether the bootstrap modal is open or not.


Advertisements

Add Comment

📖 Read More