Wondering if someone could help find a solution to my problem, Im using the below code which I placed into genesis header settings on the theme settings page to make page anchors scroll. Ive checked with firebug and can see the jquery is loading, but the scroll effect isn't working and still continues to jump.
Anyone have any pointers or advice for this?? I don't really want to use a plugin for a few lines of code if that makes sense.
Thanks in advance.
//catch all clicks on a tags
//check if it has a hash (i.e. if it's an anchor link)
var hash = this.hash.substr(1);
var $toElement = jQuery("[id="+hash+"]");
var toPosition = $toElement.position().top;
//scroll to element
scrollTop : toPosition
//do the same with urls with hash too (so on page load it will slide nicely)
var hash = location.hash;
Not live rfmeier, I tried it in the footer but still the same results!
I even have some other jquery code for logins etc and thought that maybe conflicting so i removed that and still the same results.
Cheers for dropping in, much appreciated.
You must be logged in to reply to this topic.
Subscribe to get early access to new themes, discounts and brief updates about what's new with StudioPress!