title: CodeIgniter pagination onclick
body: <p>Good day, 
  Quick question,</p>
  
  <p>I am using CI's pagination to my project,
  it works perfectly, but i wanted to add some
  filters on it.</p>
  
  <p>i.e. I need to catch its click event.
  although I can catch already its click event using this</p>
  
  <pre><code> $("ul.pagination &gt; li a[href]").click(function(e){
        loadingStart();
   });
  </code></pre>
  
  <p>my problem is it still redirect to the next page,</p>
  
  <p>what I need is something like this.</p>
  
  <pre><code> if(myVar == 0) {
        //do not redirect
   } else  {
        //redirect.
   }
  </code></pre>