Post by aaron1988 » Tue May 15, 2012 9:30 pm

Hi Opencart,

Wondered if someone could help me i have a link underneath Availability called "More Info" the link looks like:

Code: Select all

<span><a href="tab-attribute">More Info</a></span>
and the jquery code looks like this:

Code: Select all

<script type="text/javascript"><!--
	$(function() {
		var $tabs = $('#tabs').tabs(); // first tab selected

$('#tab-attribute').click(function() { // bind click event to link
    $tabs.tabs('select, 1); // switch to second tab
    return false;
});
	});
//--></script>


But it doesnt seem to make the tab activate once clicked the link just redirects to homepage.

If you go here: http://www.washingmachinespares.org.uk/ ... ct_id=4933

you will see what i mean. I hope someone can help me as bene trying to do this for ages.

Kind Regards,
Aaron

Active Member

Posts

Joined
Thu Jan 27, 2011 10:03 am

Post by aaron1988 » Thu May 17, 2012 5:51 am

sorry to bump this but does any1 have any idea please?

Thanks
Aaron

Active Member

Posts

Joined
Thu Jan 27, 2011 10:03 am

Post by AmandaLeighOC » Fri May 25, 2012 4:54 pm

Hi,

Did you ever figure this out? Been battling with this for a good while now.

Newbie

Posts

Joined
Fri Mar 09, 2012 4:03 pm

Post by JAY6390 » Fri May 25, 2012 6:38 pm

$tabs.tabs('select, 1); // switch to second tab
should be
$tabs.tabs('select', 1); // switch to second tab

Though to be honest, you're better off using a click event on the tab you want to show. can't really tell exactly what you want to do, but say you want to switch to the review tab, you would need to have
$('a[href="#tab-review"]').click();
instead of the switch code above. That essentially does the same as the user clicking the tab

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by tomkirk23 » Tue Jun 12, 2012 2:16 am

Jay:

I would like to be able to directly access a particular tab. For instance, I would like to provide someone with a url that takes them directly to the Reviews tab on a given Product page. This is not possible in base Opencart - I have checked it on the Demo page.

Similarly, I would like to use tabs on Information pages. This works fine, but again I want to provide direct links to particular tabs.

jQuery itself enables direct access to tabs, but somehow Opencart/jQuery does not. Does this qualify as a bug? Could you suggest an approach for making this work?

Thanks.

Newbie

Posts

Joined
Wed Nov 09, 2011 11:14 pm

Post by Steven_B » Sat Dec 08, 2012 9:15 pm

Did anybody get a solution for this?

I would also want to create a direct link to a product review tab...
Also not succeeding, all link efforts go to homepage.


Many thanks

User avatar
New member

Posts

Joined
Sat Apr 28, 2012 7:08 pm
Location - Cape Town, South Africa
Who is online

Users browsing this forum: Google [Bot] and 19 guests