title: Prevent calling a function
body: <p>I have two parts of scripts.</p>
  
  <hr>
  
  <pre><code>Part 1 :
  $("mySelector").click(function() {
       alert('you call me');
  })
  </code></pre>
  
  <hr>
  
  <pre><code>Part 2 :
  $("mySelector").click(function() {
       if(myCondition) {
            //how can i prevent calling the first function from here ???
       }
  })
  </code></pre>
  
  <p>The whole problem, is that <strong>i have no access to part1</strong>. So i need to unbind the event allready specified in part 1, if myCondition is true, but otherwise i need to call the first function.</p>
  
  <p>Thanks</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>Thank you. I didn't know about stopImmediatePropagation(). But i feel, that there must be something like that :)</p>
  
  <p>But actually in my case it doesn't work :(</p>
  
  <p>Please have a look at my site
  <a href="http://www.tours.am/en/outgoing/tours/%D5%80%D5%B6%D5%A4%D5%AF%D5%A1%D5%BD%D5%BF%D5%A1%D5%B6/Park-Hyatt-Goa/" rel="nofollow">http://www.tours.am/en/outgoing/tours/%D5%80%D5%B6%D5%A4%D5%AF%D5%A1%D5%BD%D5%BF%D5%A1%D5%B6/Park-Hyatt-Goa/</a></p>
  
  <p>Under the <strong>hotel description</strong> tab i have cloud carousel, when i click on not active image (not the front image), as you can see i'm consoling that i stopImmediatePropagation() there, but the event however calls :(</p>