PageSourceSearch

https://c-spot.com/wp-content/plugins/netgo-expandablecollapsible-menu/include/script.js?ver=1.0

js c-spot.com collected 2026-10-02 12:39:04 UTC 2,297 bytes, 79 lines download raw bytes

1jQuery(function($) {
2
3	var $netgo_navigations = $("div.netgo_navigation");
4	var options = window.netgo_navigation_options;
5
6	// hide childs on load
7	$netgo_navigations.find("ul ul").hide();
8	$netgo_navigations.find(".sub-menu").hide();
9	
10	
11	// open up onstart
12	//$netgo_navigations.find("li.current_page_ancestor,li.current_page_parent,li.current_page_item").find("ul:first").show();
13	
14	// Click on a = possibly expand, or possibly go to link
15	$netgo_navigations.find("ul a").live("click", function(e, isFromLI) {
16
17		e.stopPropagation();
18		
19		$this = $(this);
20		var do_expand = true;
21		
22		// get the options for this instance
23		var widget_wrapper = $this.closest("div.netgo_navigation");
24		var widget_options = options[widget_wrapper.attr("id").replace("-", "")];
25		
26		// Grab the ul that we will expand/collapse
27		var next_ul = $this.next("ul");
28
29		// Determine if this is the parent link of a ul or not
30		if (!next_ul.length) {
31			// Not a parent, does not have childs. Just go to the link.
32			return true;
33		}
34		
35		
36		// click on link, don't do anything unless "clickable_parent"is true, then we expand!
37		// or if the click comes from an LI-element, then do not go to link, just expand
38		if (widget_options.clickable_parent || isFromLI) {
39			// clickable parent, so expand and don't go to link
40			e.preventDefault();
41		} else {
42			// not clickable parent, don't expand, go to link
43			do_expand = false;
44		}
45		
46		if (do_expand) { 
47			
48			if ($this.next("ul").length) {
49				$this.next("ul:first").slideToggle("fast", function() {
50					if ( $this.find("ul:first").is(":visible") ) {
51						$this.removeClass("netgo-navigation-deselected");
52						$this.addClass("netgo-navigation-selected");
53					} else {
54						$this.removeClass("netgo-navigation-selected");
55						$this.addClass("netgo-navigation-deselected");
56					}
57				});
58				
59			}
60
61		}
62
63	});
64
65	// Click on li = expand, but don't go to link
66	$netgo_navigations.find("ul li").live("click", function(e) { 
67		
68		// click the first a below this one, because that's where the action is
69		e.stopPropagation();
70		var $this = $(this);
71		
72		// Trigger click event on the link.
73		// Also pass extraParameter "true" that tells the click event to just expand and not go to the link
74		$this.find("a:first").trigger("click", [true]);
75		
76		return;
77
78	});
79});

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.