Smooth Scrolling for specific anchor links

I'm using Google's smooth scrolling script for a specific anchor link \[code\]#tothetop\[/code\] and not with any \[code\]#\[/code\] only. I've done this in the example.js file (that you download with the script):Changed:\[code\]$('a[href*=#]').click(function() { ... });\[/code\]To: \[code\]$('a[href*=#tothetop]').click(function() { ... });\[/code\]So now it only applies the smooth scrolling to \[code\]#tothetop\[/code\], but how would I apply it to other different anchor links? eg: \[code\]#tothetop\[/code\], \[code\]#tothebottom\[/code\], \[code\]#gotothepub\[/code\], etc.?(Don't ask why I'm not using the '#' because that's a long story but in short - it conflicts with another script on the page)I've tried:\[code\]$('a[href*=#tothetop]','a[href*=#tothebottom]').click(function() { ... });\[/code\]But this doesn't work. I'm not too knowledgeable with Javascript and PHP but I'm sure there's a simple way to do this?Full code for example.js goes like:\[code\]$(function(){$('a[href*=#tothetop]').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) { var targetOffset = $target.offset().top; $('html,body').animate({scrollTop: targetOffset}, 1000); return false; } }});});\[/code\]
 
Top