jQuery not working after AJAX Call
<p>THE SOLUTION!!! </p>

<pre><code>&lt;script type="text/javascript"&gt;
jQuery(function($) {

    $("#block-cart").hide();

    $("#cart-sidebar")
        .on("mouseenter", "#block-cart", function () {
                $(this).data("hover", true);
                $(this).show();
            })
            .on("mouseleave", "#block-cart", function() {
                $(this).data("hover", false);
                $(this).fadeOut(200);    
            });

    $("#cart-sidebar")
        .on("mouseenter", "#btn-cart", function () {
                $("#block-cart").show();
            })        
        .on("mouseleave", "#btn-cart", function() {
                setTimeout(function() {
                    var btncartHovered = $("#block-cart").data("hover");
                    if (!btncartHovered) {
                        $("#block-cart").fadeOut(200);
                    }
                }
                , 50)
            });

}); 
&lt;/script&gt;
</code></pre>

<p>link to try: <a href="http://modernego.info/summer-craze.html" rel="nofollow">http://modernego.info/summer-craze.html</a></p>

<p>To reproduce my problem, go to the link above, add a item to the cart, then hover over the shopping cart and the quantity, and try to hover over the item in your cart. As you can see, the shopping care will .fadeOut(200).</p>

<p>Anyway, this jQuery script below works perfectly to bring down the sidebar cart when you hover over the shopping cart BEFORE AJAX IS CALLED (or you add/ delete an item from your cart). However, after the AJAX is ran, the div ".block-cart" will not stay in the show() position when you hover on it. </p>

<p>Now, I know I should be using .on() but I just don't know how to implement in my script. I have been trying, researching for hours and am still coming up empty handed. </p>

<p>Could anyone give me a hand? </p>

<p>ajax calls occur in here </p>

<p><a href="http://modernego.info/js/aw_ajaxcartpro/ajaxcartpro-1.4.6.js" rel="nofollow">http://modernego.info/js/aw_ajaxcartpro/ajaxcartpro-1.4.6.js</a></p>

<p><a href="http://modernego.info/js/aw_ajaxcartpro/ajaxcartpro-community-1.4.6.js" rel="nofollow">http://modernego.info/js/aw_ajaxcartpro/ajaxcartpro-community-1.4.6.js</a></p>

<pre><code>jQuery(function($) {

$(".block-cart")
    .hide()
    .hover(function(){
        $(this).data("hover", true);
        $(this).show();
    }, function(){
        $(this).data("hover", false);
        $(this).fadeOut(200);
    });


$("#btn-cart")
    .hover(function(){
        $(".block-cart").show();
    }, function(){
        setTimeout(function(){
            var menuHovered = $(".block-cart").data("hover");
            if(!menuHovered) {
                $(".block-cart").fadeOut(200);
            }
        }, 50);
    });

}); 


&lt;li class="hover hover-cart-sidebar"&gt;
      &lt;a href="http://modernego.info/checkout/cart/" class="btn-cart hover-cart" id="btn-cart" title="Cart"&gt;

         &lt;span class="quantity"&gt;0&lt;/span&gt;

     &lt;/a&gt; 

      &lt;div class="block block-cart"&gt;
         &lt;div class="block-title"&gt;
              &lt;strong&gt;&lt;span&gt;My Cart&lt;/span&gt;&lt;/strong&gt;
        &lt;/div&gt;
           &lt;div class="block-content"&gt;
                        &lt;p class="empty"&gt;Add something to your cart.&lt;/p&gt;


            &lt;/div&gt;
  &lt;/div&gt;
&lt;/li&gt;




IM NOT TO SURE IF THIS IS THE CORRECT AJAX CALL

function ajaxcartprodelete(url) {
    showProgressAnimation();
    url = getCommonUrl(url)
    if(typeof aw_acp_retries == 'undefined') aw_acp_retries = 0;

    new Ajax.Request(url, {
        onSuccess: function(resp) {
            try {
                if (typeof(resp.responseText) == 'string') eval('resp = ' + resp.responseText);
            } catch(e) {
                return;
            }
            if(resp &amp;&amp; resp.error &amp;&amp; resp.error == 'quote error' &amp;&amp; aw_acp_retries == 0) {
                aw_acp_retries = 1;
                return ajaxcartprodelete(url);
            }
            aw_acp_retries = 0;
            hideProgressAnimation();
            __onACPRender()
            updateCartView(resp, '');
        }
    });
}
</code></pre>
