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

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -