title: How to prevent default link action and still allow bubbling?
body: <p>After reading this question <a href="https://stackoverflow.com/questions/6745618/how-to-prevent-default-event-firing-but-still-allow-event-to-bubble">How to prevent default event firing but still allow event to bubble</a>, I am still having the issue where the event is not prevented and when the link is clicked, it takes the user to the top of the page.</p>
  
  <p>My HTML is:</p>
  
  <pre><code>&lt;div class="ajax-load"&gt;&lt;a href="/?show=all" id="set-home"&gt;HOME&lt;/a&gt;&lt;/div&gt;
  
     &lt;div id="preContent"&gt;
         &lt;div id="content"&gt;
             //SOME CONTENT
         &lt;/div&gt;
     &lt;/div&gt;
  </code></pre>
  
  <p>My jQuery is:</p>
  
  <pre><code>jQuery('.ajax-load').click(function() { 
     //DO SOME STUFF
     //LOADS SOME URL INSIDE A DIV
     return false;
  
  });
  
  jQuery('#set-home').click(function(event) {
     event.preventDefault();  
     //DO SOME STUFF  
     //SETS SOME NEW ATTRIBUTES FOR ANOTHER ELEMENT       
  });
  </code></pre>
  
  <p>I need to prevent default behavior for both parent and child and allow bubbling.</p>
  
  <h2>EDIT: (to clarify what I am trying to do...)</h2>
  
  <p>When I click <code>#set-home</code>, I am changing an attribute in another element and at the same time, <code>.ajax-load</code> will fire a function that loads and url in an element.</p>
  
  <h2>EDIT 2:</h2>
  
  <p>This is the code I have for <code>.ajax-load</code></p>
  
  <pre><code>var mainContent = jQuery("#preContent"),
      is_ajaxed_page  = "",
      everPushed  = false,    
  
  jQuery(".ajax-load").on("click infinite", "a", function() {
      _link = jQuery(this).attr("href");
      history.pushState(null, null, _link);
      everPushed = true;
      jQuery(mainContent).waypoint("destroy");
      loadContent(_link);
      return false;
  });
  
  function loadContent(href){
      jQuery(mainContent)
              .find("#content")
              .fadeOut(100, function() {
                  jQuery(mainContent).hide().load(href + " #content", { is_ajaxed_page: "yes" }, function() {
                      jQuery(mainContent).fadeIn(100, function() {
                          infscroll();
  
                      });         
                  });
              });
  
  }
  </code></pre>