How to return true on link without breaking scrollto
Hi,
I am using the below function to scroll to sections on a menu. It works but I need the links that activate the scrollto to still be links to pages. If I change "return false;" to "return true;" this links to the pages but the scrollto function does not work. Is there anyway it can do both?
Many thanks in advance for your help.
$(function(){
var $pane = $('#scroll-pane');
$pane.jScrollPane({animateTo:true});
$('a#scroll-to').bind(
'click',
function(){
var targetElementSelectorString = $(this).attr('rel');
$pane[0].scrollTo(targetElementSelectorString);
return false;
}
);
});