Click event stops working
<p>I wish someone could help me, I'm a little bit irked about this problem since I've been resolving other issues with this scroll behavior that I'm trying to implement on this <a href="http://altivamedia.com/pruebas/romulos/wp/menu/" rel="nofollow">site</a>...  as you see my sub-menu (on the left) follows the window position as you scroll or you can click any option on the sub-menu wich will trigger an animation, well what seems to be the problem is that everytime I click a second time it won't work, until I re-click it, it will work...</p>

<p>Here's my code</p>

<p>Variables</p>

<pre><code>var startDistance = 210;
var $scrollingDiv = $("#sub-menu");
var position = $("#footer").position();
var height = $("#sub-menu").height();
var pos = position.top - (height + 460);
</code></pre>

<p>This is to differ between users and animation scroll</p>

<pre><code>$("body,html").bind("scroll mousedown DOMMouseScroll mousewheel keyup", function(e){
            if ( e.which &gt; 0 || e.type === "mousedown" || e.type === "mousewheel"){
                 if($(window).scrollTop() &gt; startDistance &amp;&amp; $(window).scrollTop() &lt; pos) {

                    $scrollingDiv.stop().animate({
                        paddingTop: ($(window).scrollTop() - 75) + "px"
                    }, 'slow');

                }
                if($(window).scrollTop() == 0) {
                    $scrollingDiv.stop().animate({
                        paddingTop: 0
                    }, 'slow');
                }
            }
     });
</code></pre>

<p>Click behavior</p>

<pre><code>$("#sub-menu ul li a").live('click', function(ev) {
            var $anchor = $(this);
            console.log($anchor.attr('href'));
            $('html, body').stop().animate({
                scrollTop: $($anchor.attr('href')).offset().top
            }, 1500,'easeInOutExpo', function() {
                $scrollingDiv.stop().animate({
                    paddingTop: ($($anchor.attr('href')).offset().top - 556) + "px"
                }, 'slow');
            });
        event.preventDefault();
    });
</code></pre>

<p>It might be the silliest thing but I've been watching my screen for last hour w/o being able to realize what's going on.</p>

<p>Edit: I'm posting my scroll code behavior too because I feel that It might be a global problem and not only related to my click code</p>

<p>Thank you in advance!</p>
