1// JavaScript Document 2//Slider 3$(document).ready(function() { 4 $(".header .navbar .nav > li ul").hide(); 5 $(".header .navbar .nav-collapse > ul").addClass('nav'); 6 $(".header .navbar .nav li>ul").addClass('dropdown-menu'); 7 $('.dropdown-menu').parent('li').append('<span class="menuArrow"></span>'); 8 9 // Handle click event for sub-menu items 10 $('.header ul.nav li').click(function (e) { 11 e.stopPropagation(); // Prevent the event from bubbling to the parent menu item 12 13 openMenu(this); 14 }); 15 16 $('.header ul.nav li a').on('click', function(event) { 17 // Get the href attribute value of the clicked link 18 const hrefValue = $(this).attr('href'); 19 const modifiedString = hrefValue.replace(/[#\s]/g, ''); 20 if(modifiedString.length == 0){ 21 event.preventDefault(); 22 }else{ 23 window.location.href = hrefValue; 24 } 25 }); 26 27 28 /* MCDEV-12338: rewritten for Owl 2.3.4, replacing a hand-patched 1.3.3 copy that used to 29 live in this site's own asset directory. Every band of the old ladder resolved to 1 30 item, so it collapses to items:1. stopOnHover becomes autoplayHoverPause. autoPlay was 31 declared twice, 3000 then true, and JS keeps the last - so the interval has always been 32 1.3.3's default 5000ms, not the 3000 the comment claimed; left at the 2.x default, 33 which is also 5000. */ 34 $(".img-slider").owlCarousel({ 35 items : 1, 36 nav : true, 37 dots : false, 38 autoplay : true, 39 autoplayHoverPause : true, 40 touchDrag: false, 41 mouseDrag: false, 42 animateOut : 'fadeOut' 43 }); 44 $(".btn-navbar").click(function(){ 45 $(".nav-collapse").toggleClass("nav-toggle"); 46 }); 47}); 48function validateSearchForm() { 49 if ($('#s_key_all').val().length == 0) { 50 alert('Enter your search terms.'); 51 return false; 52 } else { 53 return true; 54 } 55} 56function openMenu(thisObj){ 57 var clickedMenuArrow = $(thisObj); 58 clickedMenuArrow.find('>ul').toggle("fast"); 59 60 // Toggle all .menuArrow elements except the clicked one 61 $('.header ul.nav li').not(clickedMenuArrow).not($(thisObj).parents('li')).find('ul').hide("fast"); 62}
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.