Support » Theme: Nisarg » _blank in Menu top level opens in current tab & new tab

  • Resolved danielb96


    I have links to external sites in my primary menu.
    There are 3 cases when I try to use an external link in the menu with “_blank” as the target. (This was added using the “new window” checkbox in the Appearance > Menu page)

    Case 1) It is top level navigation with no children. In this case, _blank opens the link in a new tab but also opens it in the current tab.
    Case 2) It is top level navigation with children. In this case, it just opens in the current window and _blank doesn’t work at all.
    Case 3) It is 2nd level navigation. It works correctly.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author Falguni


    Hello danielb96,

    Thanks for letting me know about these issues. I have updated the theme meeting all above requirements. Please download the new version of the theme.


    Thank you so much!



    Hi Falguni,

    I still see an error in case we have no href in nisarg.js arround:

    //handles top level menu item having children
        $( '.navbar-nav > > .dropdown-toggle' ).click( function(){
        	if($(this).attr('target') == '_blank')
    ; // $( this ).attr( 'href' );
              window.location = $( this ).attr( 'href' );

    If we have no href (just a button) it should just open the menu and not try to go anywhere.


Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.