title: jQuery check if it is clicked or not
body: <pre><code>$( element ).click( function() {
  
  });
  </code></pre>
  
  <p>How can I check if the element is clicked or not? I'm doing like that </p>
  
  <pre><code>function element() {
      $( "#element" ).click( function() {
          return 0;
      } );
  }
  if( element() == 0 ) {
      alert( "yes" );
  } else {
      alert( "no" );
  }
  </code></pre>
  
  <p>But it's not returning anything.</p>