PageSourceSearch

https://www.channingbete.com/store/20190523381/assets/themes/desktop2_en/js/megaNav.js

js channingbete.com collected 2026-09-28 12:13:30 UTC 2,061 bytes, 92 lines download raw bytes

1;(function($) {
2
3  $.fn.megaNav = function(options) {
4    if (!options.vid){
5      console.log("No vendor given");
6      return;
7    };
8
9    var
10      cache     = {},
11      mustaches = Avetti.mustaches,
12      partials  = Avetti.partials;
13
14    this.mouseenter(function() {
15      $("#megaNav-contain").show();
16    });
17
18    this.mouseleave(function () {
19      $("#megaNav-contain").hide();
20      $("#megaNav-panel").hide();
21    });
22
23    this.find("nav a").mouseover(function(event){
24      var cid = $(this).attr("data-cid");
25
26      if (!cid){
27        return;
28      }
29
30      if (cache[cid]){
31        renderSubCats(cid);
32
33      }
34      else{
35        var url = "subcat.ajx"
36          + "?vid=" + options.vid
37          + "&cid=" + cid;
38
39        $.getJSON(url, function( data ){
40          data = processCatergory(data);
41
42          cache[cid] = Mustache.render(mustaches.megaNav_category, data, partials);
43
44          renderSubCats(cid);
45
46        });
47      }
48    });
49
50    function renderSubCats(cid) {
51      $("#megaNav-panel").html(cache[cid]);
52      $("#megaNav-panel").show();
53
54      $("div[name='meganav']").hide();
55      $("#"+cid).show();
56      if($("#"+cid).attr('name') =="hidemeganav"){
57      $("#megaNav-panel").hide();
58}
59
60    };
61
62
63    function processCatergory(data){
64      return {
65        name:        data.name,
66        cid:         data.cit,
67        vid:         data.vid,
68        position:    data.position,
69        description: data.description,
70        URL:         data.URL,
71
72        properties:  processProperties(data.properties),
73
74        childs: data.childs.map(function(subcat){
75          return processCatergory(subcat);
76        })
77      };
78    }
79
80    function processProperties(properties) {
81      props = {};
82
83      for (var index = properties.length - 1; index >= 0; index--) {
84        var propname = properties[index].propname.toLowerCase();
85        props[propname] = properties[index].propvalue;
86      };
87
88      return props;
89    }
90  };
91
92} (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.