Wordpress menus

Asked

Viewed 68 times

0

I have to make a site, those with a page only with automatic scroll, but in Wordpress. What is the function that I can use that does this? I mean, just the ones that carry the menu items.

  • 2

    What you have tried or researched so far?

  • What have I researched? Hmm... dozens of things "ready" with plugins for laymen like installs and goes. But I didn’t find any functions to return the links in "anchors" : (

  • http://streetsmash.com/infinite-scrolling-wordpress-themes/

1 answer

1

if that’s what I understood Voce can use this code (jquery)

$(function() {
  $('a[href*=#]:not([href=#])').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;
      }
    }
  });
});

source

Browser other questions tagged

You are not signed in. Login or sign up in order to post.