Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Selected tab - on page load

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 09-10-2014, 05:35 AM
 
Martin Bishop Martin Bishop is offline
 

Advanced Member
  
Join Date: Sep 2011
Posts: 65
 

Default Selected tab - on page load

Anyone know how I would get the first ui tab to always but the one open when a page loads?

At the moment if I select say the 3rd tab on one product and then navigate to e new product then the page will open on the 3rd tab. I want each page to open on the 1st tab.

my uitabs.tpl currently shows this at the top which I guess may be controling this:

Code:
<script type="text/javascript"> //<![CDATA[ $(function() {ldelim} var tOpts = {ldelim} idPrefix: '{$prefix|default:"ui-tabs-"}', cookie: {ldelim} expires: 1 {rdelim}{if $selected}, selected: '{$selected}'{/if} {rdelim}; $('#{$prefix}container').tabs(tOpts); {rdelim}); //]]> </script>

and I've read a number of things which reference something like this as a way of selecting a specific tab:

Code:
$("yourSelector").tabs({ active: 2 });

but have absolutely no idea how to put the two together? anyone have any idea what I need to do?

thanks
__________________
4.4.3
Reply With Quote
  #2  
Old 09-10-2014, 05:53 AM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default Re: Selected tab - on page load

Just insert...
Code:
active: 2,
Right before...
Code:
cookie: {ldelim}
__________________
xcartmods.co.uk
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:13 AM.

   

 
X-Cart forums © 2001-2020