Tagged: 

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #283912

    So, on this page: http://www.caliberprotoproject.com/dealers/

    I have an SVG set up with anchor tags that correspond to different color sections below it.

    However, the theme’s smooth scrolling doesn’t seem to work in conjunction with it.

    I inserted this script into the code block (as well have tried calling it from a folder directory under my child theme) to no avail:

    $(‘a’).click(function(){
    $(‘html, body’).animate({
    scrollTop: $( $.attr(this, ‘href’) ).offset().top
    }, 500);
    return false;
    });

    Any ideas?

    #284256

    Hi tlow87!

    Seems like something is causing a conflict with the themes javascript. If you have any plugins running, deactivate them and then check things out.

    Also try removing the js snippet above if you’ve got it placed within something that isn’t getting enqueued. Then we’ll see where we are at and if the current js error gets cleaned up.

    Cheers!
    Devin

    #284309

    I’ve removed the snippet and disabled plugins. No effect.

    #284549

    Hi!

    Not sure if this will fix the issue but try to replace the xlink:href attribute with a simple href.

    Best regards,
    Peter

    #287435

    Thanks Dude,

    Unfortunately it didn’t work.

    #288068

    Hey!

    I tagged this thread for Kriesi. I couldn’t find a quick solution and I’ll leave it up to him to decide whether he wants to support the xlink:href attribute or not.

    Regards,
    Peter

    #293128

    Thanks so much dude! I appreciate it!

Viewing 7 posts - 1 through 7 (of 7 total)

The topic ‘Can't figure out what's going wrong with anchor tags’ is closed to new replies.