Hi, I have a link on my page that when clicked opens up two tabs below, I then want it to scroll down to an anchor on the same page using the anchorSlider plugin.
The problem I'm having is when I click my link, the tabs open, I have the click the link again to make the page scroll down.
Any idea how I can make it do both functions on the first click?
My code is as follows:
if($('span.opener').length) {
$('span.opener a').click(function(){
$('div.exp').each(function(){
$(this).show();
});
$('div.togglewrap img').each(function(){
if ($(this).parent().parent().hasClass("orange")) {
col = "orange";
} else if ($(this).parent().parent().hasClass("lightorange")) {
col = "lightorange";
} else {
col = "white";
}
$(this).attr("src","/images/tab-"+col+"-close.png");
$('p.header').animate({'padding-top':'30'},300);
});
$("span.opener a").anchorAnimate();
return false;
});
}
Thanks