Home Forums Theone WordPress Theme How to add link with archor in page

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #5691
    SeaTheme
    Keymaster
    Purchased
    Expired

    1. add the code below line 762 themeData.win.load(function(){ of js/custom.theme.js

    $('a[href*=#]:not([href=#]).somewhere').click(function() {
    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
    		      var target = $(this.hash);
    		      target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
    		      if (target.length) {
    		        $('html,body').animate({
    		          scrollTop: target.offset().top
    		        }, 1000);
    		        return false;
    		      }
     }
    });

    2. Add the link with class="somewhere" as screenshot in wordpress default editor

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.