visibility - javascript - jquery dom manipulation cheat sheet - How do I check if an element is hidden in jQuery?

jquery create element / javascript / jquery / dom

Is it possible to toggle the visibility of an element, using the functions .hide(), .show() or .toggle()?

Nicolas Gervais

Answer #1
$('#clickme').click(function() {
  $('#book').toggle('slow', function() {
    // Animation complete.
    alert($('#book').is(":visible")); //<--- TRUE if Visible False if Hidden
<script src=""></script>
<div id="clickme">
  Click here
<img id="book" src="" alt="" width="300"/>