Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author sevenspark

    (@sevenspark)

    Hi Rob,

    Thanks, glad you’re enjoying the plugin! ??

    What I would do is use the ShiftNav Javascript API to close the menu on click. Something along the lines of

    jQuery( document ).ready( function( $ ){
      $( '.shiftnav .menu-item' ).on( 'click' , function(){
        $( '.shiftnav' ).shiftnav( 'closeShiftNav' );
      });
    });

    Hope that helps! ??

    Chris

    Thread Starter robsarna

    (@robsarna)

    Thanks Chris,

    You are a lifesaver!

    The code that ended up working for me (incase anyone else needs) was:

    <script type="text/javascript">
     jQuery( '.shiftnav-target' ).on( 'click' , function(){
     jQuery( '.shiftnav' ).shiftnav( 'closeShiftNav' );
      });
    </script>

    Chris – send me your paypal, i owe you a beer! (or ill just buy the premium one!)

    Rob

    Plugin Author sevenspark

    (@sevenspark)

    You’re welcome, Rob, glad it helped! ??

    Donation link is here: https://bit.ly/bVogDN

    But the the Pro version is an even better deal as you get a bunch of advanced options ?? Totally up to you, and not necessary either way.

    Take care! ??

    Chris

    Hi guys,

    I think i’m being really stupid but where is the Javascript API?

    Where exactly do I enter that code?

    Thanks
    Tom

    Plugin Author sevenspark

    (@sevenspark)

    The code would go in a custom javascript file (discussed further in a Pro support ticket)

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Close menu on item click’ is closed to new replies.