PageSourceSearch

https://www.sharpusa.com/Portals/_default/skins/www-usa/MegaMenu/MegaMenu.js

js sharpusa.com collected 2026-09-24 08:45:35 UTC 3,888 bytes, 104 lines download raw bytes

1jQuery(document).ready(function ($) {
2
3    function megaHoverOver() {
4        $(this).addClass('rmhover') .find(".category").stop().animate({opacity:'show',height:'show'},200);
5			
6			// megamenu right align
7			var position	= $(this).offset();
8			var x	= position.left;
9			var width	= $(this).find(".category").width();
10			// position
11			if( x + width > $(window).width())
12			{
13				$(this).find(".category").css({"right": 0, "left": "auto"});
14			}
15    }
16
17    function megaHoverOut() {
18         $(this).removeClass('rmhover').find(".category").animate({opacity:'hide',height: 'hide'},200, function() {
19		  $(this).hide(); 
20	  });
21    }
22
23    if ($(window).width() >= 768)
24    {
25        var config = {
26            sensitivity: 2,
27            interval:100,
28            over: megaHoverOver,
29            timeout:100,
30            out: megaHoverOut
31        };
32        $("#megaMenu .root > li.haschild").hoverIntent(config);
33    }
34	else if ($(window).width() <= 767)
35	{
36		$("#megaMenu li.child-1 .navarrow").click(function(event) {
37		  event.preventDefault();
38		  $("#megaMenu li.child-1 .category").slideToggle("fast");
39		  $(this).toggleClass("navarrow2"); return false;	
40		});	
41		$("#megaMenu li.child-2 .navarrow").click(function(event) {
42		  event.preventDefault();
43		  $("#megaMenu li.child-2 .category").slideToggle("fast");
44		  $(this).toggleClass("navarrow2"); return false;
45		});	
46		$("#megaMenu li.child-3 .navarrow").click(function(event) {
47		  event.preventDefault();
48		  $("#megaMenu li.child-3 .category").slideToggle("fast");
49		  $(this).toggleClass("navarrow2"); return false;
50		});	
51		$("#megaMenu li.child-4 .navarrow").click(function(event) {
52		  event.preventDefault();
53		  $("#megaMenu li.child-4 .category").slideToggle("fast");
54		  $(this).toggleClass("navarrow2"); return false;	
55		});	
56		$("#megaMenu li.child-5 .navarrow").click(function(event) {
57		  event.preventDefault();
58		  $("#megaMenu li.child-5 .category").slideToggle("fast");
59		  $(this).toggleClass("navarrow2"); return false;	
60		});	
61		$("#megaMenu li.child-6 .navarrow").click(function(event) {
62		  event.preventDefault();
63		  $("#megaMenu li.child-6 .category").slideToggle("fast");
64		  $(this).toggleClass("navarrow2"); return false;	
65		});	
66		$("#megaMenu li.child-7 .navarrow").click(function(event) {
67		  event.preventDefault();
68		  $("#megaMenu li.child-7 .category").slideToggle("fast");
69		  $(this).toggleClass("navarrow2"); return false;	
70		});	
71		$("#megaMenu li.child-8 .navarrow").click(function(event) {
72		  event.preventDefault();
73		  $("#megaMenu li.child-8 .category").slideToggle("fast");
74		  $(this).toggleClass("navarrow2"); return false;	
75		});	
76		$("#megaMenu li.child-9 .navarrow").click(function(event) {
77		  event.preventDefault();
78		  $("#megaMenu li.child-9 .category").slideToggle("fast");
79		  $(this).toggleClass("navarrow2"); return false;	
80		});	
81		$("#megaMenu li.child-10 .navarrow").click(function(event) {
82		  event.preventDefault();
83		  $("#megaMenu li.child-10 .category").slideToggle("fast");
84		  $(this).toggleClass("navarrow2"); return false;	
85		});	
86		$("#megaMenu li.child-11 .navarrow").click(function(event) {
87		  event.preventDefault();
88		  $("#megaMenu li.child-11 .category").slideToggle("fast");
89		  $(this).toggleClass("navarrow2"); return false;	
90		});	
91		$("#megaMenu li.child-12 .navarrow").click(function(event) {
92		  event.preventDefault();
93		  $("#megaMenu li.child-12 .category").slideToggle("fast");
94		  $(this).toggleClass("navarrow2"); return false;	
95		});	
96	}
97	
98   // For Win8 Tablet
99   $('#megaMenu .root > .haschild li').attr("aria-haspopup","false");
100   $('#megaMenu .root > .haschild li').attr("role","menu");
101   $('#megaMenu .root > .haschild').attr("aria-haspopup","true");
102   $('#megaMenu .root > .haschild').attr("role","menuitem");
103
104});

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.