PageSourceSearch

http://www.ilectureonline.com/ilectureonline/static/js/web2py_bootstrap.js

js ilectureonline.com collected 2026-09-27 21:14:09 UTC 1,297 bytes, 33 lines download raw bytes

1// this code improves bootstrap menus and adds dropdown support
2jQuery(function(){
3  jQuery('.nav>li>a').each(function(){
4    if(jQuery(this).parent().find('ul').length)
5      jQuery(this).attr({'class':'dropdown-toggle','data-toggle':'dropdown'}).append('<b class="caret"></b>');
6  });
7  jQuery('.nav li li').each(function(){
8    if(jQuery(this).find('ul').length)
9      jQuery(this).addClass('dropdown-submenu');
10  });
11  function adjust_height_of_collapsed_nav() {
12        var cn = jQuery('div.collapse');
13        if (cn.get(0)) {
14            var cnh = cn.get(0).style.height;
15            if (cnh>'0px'){
16                cn.css('height','auto');
17            }
18        }
19  }
20  function hoverMenu(){
21    jQuery('ul.nav a.dropdown-toggle').parent().hover(function(){
22        adjust_height_of_collapsed_nav();
23        var mi = jQuery(this).addClass('open');
24        mi.children('.dropdown-menu').stop(true, true).delay(200).fadeIn(400);
25    }, function(){
26        var mi = jQuery(this);
27        mi.children('.dropdown-menu').stop(true, true).delay(200).fadeOut(function(){mi.removeClass('open')});
28    });
29  }
30  hoverMenu(); // first page load
31  jQuery(window).resize(hoverMenu); // on resize event
32  jQuery('ul.nav li.dropdown a').click(function(){window.location=jQuery(this).attr('href');});
33});

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.