javascript - smooth scroll and accordion conflict bootstrap -


although has been asked few times haven't found fix problem.

this code smooth scroll:

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

it's css-tricks code bit of editing. site: http://redrocketwebsitedesign.co.uk/test/my3dtwinalpha/about/#arrow6

so accordion still being selected scrolling, , it's not running accordion js. think there's problem javascript not selector code : a[href*=#]:not(a[data-toggle])

any appreciated :-]

the page provided has mistake in code:

$('a[href*=#]:not([href=#]),'a[href^="#"]:not([data-toggle])').click(function() {                            ^^^ - , unnecessary character 

so handler not set.


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -