title: jquery check href for string on click?
body: <p>i was wondering how I could check to see if my href contains a string within the click function? I've tried different ways and have looked at other similar questions, but I can't seem to get it working.. I've tried contains and also regexp.. Here's the code:</p>
  
  <pre><code>$.each($ul.find('a'),function(){
    $(this).click(function(e){
      e.preventDefault();
      if (  ) { // this is where i've been trying check whether the href contains 'cid'...
        alert( 'your href contains cid' );
      } else {
        alert(' do nothing');
      };
    });
  });
  </code></pre>