Hi,
after loading a page, I want to show always the first tab(active-item, e.g. "Features") without a separate click.
Can you help me, modifying the code?
Thanks!!
Regards,
Martin
Always show the first tabmenu after pageload
-
- Posts: 4637
- Joined: 29 Jun 2013, 12:38
Please add the following code into template.xhtml;
in menu.xhtml
Code: Select all
<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
var $this = PF('myMenu');
if($this) {
var link = $this.tabMenuNavLinks.eq(0); // the link of "Features" tab
link.trigger('click');
}
});
//]]>
</script>
Code: Select all
...
<pa:tabMenu widgetVar="myMenu">
...
Github Profile: https://github.com/mertsincan
-
- Posts: 4637
- Joined: 29 Jun 2013, 12:38
Glad to hear, thanks for the update!
Github Profile: https://github.com/mertsincan
-
- Information
-
Who is online
Users browsing this forum: No registered users and 0 guests