1$(function(){ 2 $("#menu-h a.ajax-branch") 3 .hoverIntent({ 4 over: hNavOver, 5 out: $.noop 6 }) 7 8$('#menu-h').on('touchstart touchend', 'a.ajax-branch,li.folder > div > a', function(e){ 9 $this = $(this) 10 $this.closest('li').siblings().removeClass('mobile-hover') 11 .find('li').removeClass('mobile-hover') 12 if ($this.closest('li').hasClass('mobile-hover')) { 13 return; 14 } 15 $this.closest('li').addClass('mobile-hover') 16 $this.each( hNavOver ); 17 e.preventDefault(); 18 }) 19}) 20function checkTheVisibility ($e) { 21 if (!$e.length) return; 22 /* only second level down */ 23 24 if (!$('#h-nav-box').length) return; 25 26 var HNavrightPos = $('#h-nav-box').offset().left + $('#h-nav-box').outerWidth() 27 var elHrightPos = $e.offset().left + $e.outerWidth() 28 if (elHrightPos > HNavrightPos) $e.addClass('left') 29} 30function hNavOver(){ 31 $this = $(this) 32 $next = $this.parent().next() 33 if ($this.hasClass('ajax-branch')){ 34 /* prevent ajax load on any branch that already has sub menu added (ul) : i.e. the selected branch that is already drawn */ 35 if ($next.length) { 36 $this.removeClass('ajax-branch') 37 checkTheVisibility($next) 38 return false; 39 } 40 41 $.ajax({ 42 url:$this.next().filter('.ajax').attr('href'), 43 type:'post', 44 dataType:'html', 45 clicked_element: $this, 46 success: function(html){ 47 $html = $(html) 48 $("a.ajax-branch", $html) 49 .hoverIntent({ 50 over: hNavOver, 51 out: $.noop 52 }) 53 parentEl = $this.removeClass('ajax-branch').parent() 54 parentEl.after($html) 55 checkTheVisibility(parentEl.next()) 56 } 57 }) 58 } else { 59 checkTheVisibility($next) 60 } 61 return false; 62} 63function hNavOut(){ 64 return false 65}
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.