1(function($) { 2 var defaults={ 3 sm : 540, 4 md : 720, 5 lg : 960, 6 xl : 1140, 7 xxl : 1200, 8 navbar_expand: 'lg', 9 animation: true, 10 animateIn: 'fadeIn', 11 }; 12 $.fn.bootnavbar = function(options) { 13 14 settings = $.extend(defaults, options); 15 16 // $(this).find('.dropdown').click(function(){ 17 // if ($(this).hasClass('show')) 18 // { 19 // $(this).removeClass('show'); 20 // $(this).find('.dropdown-menu').first().removeClass('show'); 21 // } else { 22 // $(this).addClass('show'); 23 // $(this).find('.dropdown-menu').first().addClass('show'); 24 // if(settings.animation){ 25 // $(this).find('.dropdown-menu').first().addClass('animated ' + settings.animateIn); 26 // } 27 // } 28 // }); 29 $(this).find('.dropdown').hover(function() { 30 if($(document).width() >= settings.xxl) 31 { 32 $(this).addClass('show'); 33 var subMenu = $(this).find('.dropdown-menu').first(); 34 $(subMenu).addClass('show'); 35 if ($(this).closest('.navbar-nav').find('li.fullWnav > ul ul').index($(this).find(' > ul')) != -1) 36 { 37 $(subMenu).css('top', -1 * $(this).position().top); 38 $(subMenu).css('height', $(this).closest('.fullWnav > ul').height()); 39 } 40 if(settings.animation){ 41 $(subMenu).addClass('animated ' + settings.animateIn); 42 } 43 } 44 }, function() { 45 if($(document).width() >= settings.xxl) 46 { 47 $(this).removeClass('show'); 48 var subMenu = $(this).find('.dropdown-menu').first(); 49 $(subMenu).removeClass('show'); 50 if ($(this).closest('.navbar-nav').find('li.fullWnav > ul ul').index($(this).find(' > ul')) != -1) 51 { 52 $(subMenu).css('top', 'unset'); 53 $(subMenu).css('height', 'auto'); 54 } 55 }; 56 }); 57 58 $('.dropdown-menu a.dropdown-toggle').on('click', function(e) { 59 if (!$(this).next().hasClass('show')) { 60 $(this).parents('.dropdown-menu').first().find('.show').removeClass("show"); 61 } 62 var $subMenu = $(this).next(".dropdown-menu"); 63 $subMenu.toggleClass('show'); 64 65 $(this).parents('li.nav-item.dropdown.show').on('hidden.bs.dropdown', function(e) { 66 $('.dropdown-submenu .show').removeClass("show"); 67 }); 68 69 return false; 70 }); 71 }; 72})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.