ready for staging
This commit is contained in:
parent
72da90a5d4
commit
8506be5194
236 changed files with 16119 additions and 6 deletions
31
public/assets/vendor/bootstrap/js/bootstrap-4-navbar.js
vendored
Normal file
31
public/assets/vendor/bootstrap/js/bootstrap-4-navbar.js
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
|
||||
/*!
|
||||
* Bootstrap 4 multi dropdown navbar ( https://bootstrapthemes.co/demo/resource/bootstrap-4-multi-dropdown-navbar/ )
|
||||
* Copyright 2017.
|
||||
* Licensed under the GPL license
|
||||
*/
|
||||
|
||||
|
||||
$( document ).ready( function () {
|
||||
$( '.dropdown-menu a.dropdown-toggle' ).on( 'click', function ( e ) {
|
||||
var $el = $( this );
|
||||
var $parent = $( this ).offsetParent( ".dropdown-menu" );
|
||||
if ( !$( this ).next().hasClass( 'show' ) ) {
|
||||
$( this ).parents( '.dropdown-menu' ).first().find( '.show' ).removeClass( "show" );
|
||||
}
|
||||
var $subMenu = $( this ).next( ".dropdown-menu" );
|
||||
$subMenu.toggleClass( 'show' );
|
||||
|
||||
$( this ).parent( "li" ).toggleClass( 'show' );
|
||||
|
||||
$( this ).parents( 'li.nav-item.dropdown.show' ).on( 'hidden.bs.dropdown', function ( e ) {
|
||||
$( '.dropdown-menu .show' ).removeClass( "show" );
|
||||
} );
|
||||
|
||||
if ( !$parent.parent().hasClass( 'navbar-nav' ) ) {
|
||||
$el.next().css( { "top": $el[0].offsetTop, "left": $parent.outerWidth() - 4 } );
|
||||
}
|
||||
|
||||
return false;
|
||||
} );
|
||||
} );
|
Loading…
Add table
Add a link
Reference in a new issue