X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Selected tab - on page load (https://forum.x-cart.com/showthread.php?t=69962)

Martin Bishop 09-10-2014 05:35 AM

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

PhilJ 09-10-2014 05:53 AM

Re: Selected tab - on page load
 
Just insert...
Code:

active: 2,
Right before...
Code:

cookie: {ldelim}


All times are GMT -8. The time now is 11:28 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.