PageSourceSearch

https://japanseasons.ru/wp-content/themes/twentyfifteen/js/jqueryslidemenu.js

js japanseasons.ru collected 2026-10-08 13:34:16 UTC 2,260 bytes, 49 lines download raw bytes

1/*********************
2//* jQuery Multi Level CSS Menu #2- By Dynamic Drive: http://www.dynamicdrive.com/
3//* Created: Nov 2nd, 08'
4//* Menu avaiable at DD CSS Library: http://www.dynamicdrive.com/style/
5*********************/
6
7//Specify full URL to down and right arrow images (23 is padding-right to add to top level LIs with drop downs):
8var arrowimages={down:['downarrowclass', 'img/down.gif', 23], right:['rightarrowclass', 'img/right.gif']}
9
10var jqueryslidemenu={
11
12animateduration: {over: 200, out: 100}, //duration of slide in/ out animation, in milliseconds
13
14buildmenu:function(menuid, arrowsvar){
15	jQuery(document).ready(function($){
16		var $mainmenu=$("#"+menuid+">ul")
17		var $headers=$mainmenu.find("ul").parent()
18		$headers.each(function(i){
19			var $curobj=$(this)
20			var $subul=$(this).find('ul:eq(0)')
21			this._dimensions={w:this.offsetWidth, h:this.offsetHeight, subulw:$subul.outerWidth(), subulh:$subul.outerHeight()}
22			this.istopheader=$curobj.parents("ul").length==1? true : false
23			$subul.css({top:this.istopheader? this._dimensions.h+"px" : 0})
24			$curobj.children("a:eq(0)").css(this.istopheader? {paddingRight: arrowsvar.down[2]} : {}).append(
25				'<img src="'+ (this.istopheader? arrowsvar.down[1] : arrowsvar.right[1])
26				+'" class="' + (this.istopheader? arrowsvar.down[0] : arrowsvar.right[0])
27				+ '" style="border:0;" />'
28			)
29			$curobj.hover(
30				function(e){
31					var $targetul=$(this).children("ul:eq(0)")
32					this._offsets={left:$(this).offset().left, top:$(this).offset().top}
33					var menuleft=this.istopheader? 0 : this._dimensions.w
34					menuleft=(this._offsets.left+menuleft+this._dimensions.subulw>$(window).width())? (this.istopheader? -this._dimensions.subulw+this._dimensions.w : -this._dimensions.w) : menuleft
35					$targetul.css({left:menuleft+"px", width:this._dimensions.subulw+'px'}).slideDown(jqueryslidemenu.animateduration.over)
36				},
37				function(e){
38					var $targetul=$(this).children("ul:eq(0)")
39					$targetul.slideUp(jqueryslidemenu.animateduration.out)
40				}
41			) //end hover
42		}) //end $headers.each()
43		$mainmenu.find("ul").css({display:'none', visibility:'visible'})
44	}) //end document.ready
45}
46}
47
48//build menu with ID="myslidemenu" on page:
49jqueryslidemenu.buildmenu("myslidemenu", arrowimages)

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.