New Landing How can we help? Cardinal Linking Sub Menu direct to specify a tabs

Viewing 7 posts - 1 through 7 (of 7 total)
  • Posted in: Cardinal
  • #192240
    franklyhans
    Member
    Post count: 12

    Hello i have the same problem, i have a page with 3 tabs,
    example tab 2 > /classes/#adults, tab 3 > /classes/#kids
    I have a sub-menu consisting of adults and kids, and when user clicks on it, it doesnt seems to work or linking to the pages /classes/#adults (with the Tab pane open, tab active).

    Any solutions for this?

    Thanks

    #192242
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please provide me website url to check and resolve.
    Thanks
    Mohammad

    #192245
    franklyhans
    Member
    Post count: 12
    This reply has been marked as private.
    #192248
    franklyhans
    Member
    Post count: 12
    This reply has been marked as private.
    #192358
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please paste given below custom css code at Admin -> Theme Options -> Custom css/js.

    <script>
    jQuery('ul.sub-menu  li  a').click(function() { 
    var url = document.location.toString();
    if (url.match('#') && jQuery('.nav-tabs a[href=#'+url.split('#')[1]+']').length > 0) {
     alert(url.split('#')[1]);
    					    var thisTab = jQuery('.nav-tabs a[href=#'+url.split('#')[1]+']'),
    					    	parentTabs = thisTab.parents('.spb_tabs'),
    					    	tabHash = url.split('#')[1];
    
    					    jQuery('.nav-tabs a[href=#'+tabHash+']').tab('show');
    					}
    
    });
    </script>

    Thanks
    Mohammad

    #192411
    franklyhans
    Member
    Post count: 12

    Thank you, when I remove the alert part, it need to be click two times in order to land on the specify tabs, otherwise it works well.

    #192589
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please remove last code and use new code:-

    <script>
    jQuery('ul.sub-menu  li  a').click(function(e) { 
    e.preventDefault();
    var tabHash = jQuery(this).attr('href');
    jQuery('.nav-tabs a[href='+tabHash+']').tab('show');
    });
    </script>

    Thanks
    Mohammad

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register