title: JQuery hidden objects
body: <p>Ok guys, I have edited the question so that you can understand. I have 10 images and their respective name in paragraph. So, you have 10 images and 10 paragraphs. As the images are different, and of course, have different names, I cannot use a class. So, I used an ID to one image and another ID to its name.</p>
  
  <p>The user will click on one image, it wil hide and its respective name as well. When the user will click another image, it will hide and its respective name again until everything is  hidden. I could use a class for one image and its respective name, but the user has the right to click only on the image and not on the name. Just like a hidden object game! </p>
  
  <p>I will give you an example of one image below:</p>
  
  <pre><code>$(document).ready(function() {
      $('#image1').click(function() {
          $(this).hide('slow');
          $('#name').hide('slow');
      });
  
      if ($('#image1').is(':hidden')) {
          alert('Hello');
      }
  });​
  </code></pre>
  
  <p>Bear in mind, I changed the example so that you can understand. As you see, if the user is clicking on image, its respective name also is hidden. Both of them are hidden. Then, I verify if the image is hidden, an alert box will display. The image and its name do hide, but the alert box is not displaying... And I have to verify if the image is hidden, so that the alert box is displayed.</p>