-
Notifications
You must be signed in to change notification settings - Fork 8
Home
Vova Yatsyuk edited this page Mar 25, 2014
·
26 revisions
There are two possible ways to implement this feature:
<a href="#TAB_ALIAS_FROM_BACKEND" class="easytabs-anchor">Description</a>
For Example, the link below will activate the description tab:
<a href="#product_tabs_description_tabbed" class="easytabs-anchor">Descirption</a>
$$('WRITE_SELECTOR_HERE').first()
.observe('click', function(e) {
e.stop();
var element = e.element(),
tab = 'review',
scroll = true;
easytabs.onclick(element , e, tab, scroll);
});
For example, the code below shows how to add onclick event to the Write Review
and Read Reviews
links:
$$('.rating-links a, .no-rating a').each(function(el) {
el.observe('click', function(e) {
e.stop();
easytabs.onclick(el, e, 'review', true);
if (el.href.indexOf('#review-form') > -1) {
$('review-form') && $('review-form').scrollTo();
}
});
});