Viewing 3 replies - 1 through 3 (of 3 total)
  • You’re refering to an id by putting # before the linkreference, but the things you want to take them to dont have an id. Put id=”membership” on the h2 and remove the anchor. Like this:

    <h2 class="titles" id="membership">
    Membership
    </h2>

    Hope thats what your looking for!

    DigitalSquid

    (@twelvefootsnowman)

    You have coded them correctly, it’s your jQuery that’s stopping the anchor links from working.

    In your custom.js, try changing:

    function go_top(){
    	 $('a[href^=#]').bind("click", function(event) {
            event.preventDefault();
            var ziel = $(this).attr("href");
    
            $('html,body').animate({
                    scrollTop: $(ziel).offset().top
            }, 1000);
            return false;
        });
    }

    To:

    function go_top(){
    	 $('a[href^=#]').bind("click", function(event) {
            event.preventDefault();
            var ziel = $(this).attr("href");
    
            $('html,body').animate({
                    scrollTop: $(ziel).offset(top:0);
            }, 1000);
            return false;
        });
    }

    Thread Starter bnr289

    (@bnr289)

    Thanks guys, both your solutions worked, I ended up id=”membership” so I could keep the jquery effect

    Thanks again!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Anchors not working’ is closed to new replies.