Page 1 of 1

Clicking tabs pulls page down

Posted: Wed Oct 19, 2011 3:18 pm
by valves
Hi, I have updated my tabs to V11 and am working on a test site: http://uksolenoidvalves.com/store/G1-8- ... 26091.html
I've noticed that when clicking on a tab it automatically pulls the page up so I have to scroll back down to see the tabs content. I've looked through the library files and css but couldn't find anything, could you help?
Cheers
Keith

Re: Clicking tabs pulls page down

Posted: Wed Oct 19, 2011 5:43 pm
by norman
Hi, Keith

I cannot replicate this here. You're also using my Lightbox so I've built a site with both Tabber and Lightbox installed in the sequence your site is using. Again, it works fine here.

I'm wondering if there's something weird in the huge amount of HTML content you've got in these tabs. Try a product with just normal text in a few tabs and see if that also misbehaves.

You may also have some invalid HTML on your pages that's messing things up (e.g. badly nested or unclosed tags).

If that doesn't fix it then we can try to disable clicks on the tab headings.

Go to Design / Library / Layouts / TabbedDescription / Tabber Setup. At the bottom should be:

Code: Select all

	});
</script>
Immediately above that add a line:

Code: Select all

		$("a[href^='#tab_']").click(function(event) {event.preventDefault();});
So you now see:

Code: Select all

		$("a[href^='#tab_']").click(function(event) {event.preventDefault();});
	});
</script>
OK out, upload and see if that works.

Re: Clicking tabs pulls page down

Posted: Thu Oct 20, 2011 9:14 am
by valves
Thanks Norman, that did the trick!
I'm almost finished with layout on the product page so will go back in and clean up the html and other code. There is quite a lot of html in the tabs but they seem to work fine right across a number of browsers, I have made up some variables to include the content. I'll edit the tabber setup once finished. Many thanks!

Re: Clicking tabs pulls page down

Posted: Fri Oct 21, 2011 10:19 am
by valves
Hi Norman,

When I updated your suggestion yesterday I was quite sure it had done the trick but later yesterday I noticed the page still pulling on clicking the tabs.
Today I have added tabs with only text in to test: http://uksolenoidvalves.com/store/G1-8- ... 63358.html
but that pulls the page up also?
I'll check everything else in case but would you have any ideas?

Re: Clicking tabs pulls page down

Posted: Fri Oct 21, 2011 12:46 pm
by norman
I cannot replicate this here. If you have a spare system try installing Tabber into a default Actinic site and see if it works OK. If so that implies that there is something unique to your site that's causing this. Bad HTML perhaps.

A last resort patch would be to edit layout TabbedProductDescription and look for

Code: Select all

		echo '<li><a href="#tab_' . $anc . '_' . $panecount . '"><span>' . $tabname . '</span></a></li>';
Amend to be

Code: Select all

		echo '<li><a onclick="return false;" href="#tab_' . $anc . '_' . $panecount . '"><span>' . $tabname . '</span></a></li>';