PageSourceSearch

https://www.tahrirdocuments.org/Tahrir/dropdown.js

js tahrirdocuments.org collected 2026-10-02 11:09:43 UTC 3,173 bytes, 62 lines download raw bytes

1/*********************
2//* jQuery Multi Level CSS Menu #2- By Dynamic Drive: http://wayback.archive.org/web/20170102011345/http://www.dynamicdrive.com/
3//* Last update: Nov 7th, 08': Limit # of queued animations to minmize animation stuttering
4//* Menu avaiable at DD CSS Library: http://wayback.archive.org/web/20170102011345/http://www.dynamicdrive.com/style/
5*********************/
6
7//wayback.archive.org/web/20170102011345/http://Update:/ April 12th, 10: Fixed compat issue with jquery 1.4x
8
9//wayback.archive.org/web/20170102011345/http://Specify/ full URL to down and right arrow images (23 is padding-right to add to top level LIs with drop downs):
10var arrowimages={down:['downarrowclass'], right:['rightarrowclass']}
11
12var jqueryslidemenu={
13
14animateduration: {over: 200, out: 100}, //wayback.archive.org/web/20170102011345/http://duration/ of slide in/ out animation, in milliseconds
15
16buildmenu:function(menuid, arrowsvar){
17	jQuery(document).ready(function($){
18		var $mainmenu=$("#"+menuid+">ul")
19		var $headers=$mainmenu.find("ul").parent()
20		$headers.each(function(i){
21			var $curobj=$(this)
22			var $subul=$(this).find('ul:eq(0)')
23			this._dimensions={w:this.offsetWidth, h:this.offsetHeight, subulw:$subul.outerWidth(), subulh:$subul.outerHeight()}
24			this.istopheader=$curobj.parents("ul").length==1? true : false
25			$subul.css({top:this.istopheader? this._dimensions.h+"px" : 0})
26			$curobj.children("a:eq(0)").css(this.istopheader? {paddingRight: arrowsvar.down[2]} : {}).append(
27				'<span class="' + (this.istopheader? arrowsvar.down[0] : arrowsvar.right[0])
28				+ '" style="border:0;"></span>'
29			)
30			$curobj.hover(
31				function(e){
32					var $targetul=$(this).children("ul:eq(0)")
33					this._offsets={left:$(this).offset().left, top:$(this).offset().top}
34					var menuleft=this.istopheader? 0 : this._dimensions.w
35					menuleft=(this._offsets.left+menuleft+this._dimensions.subulw>$(window).width())? (this.istopheader? -this._dimensions.subulw+this._dimensions.w : -this._dimensions.w) : menuleft
36					if ($targetul.queue().length<=1) //wayback.archive.org/web/20170102011345/http://if/ 1 or less queued animations
37						$targetul.css({left:menuleft+"px", width:this._dimensions.subulw+'px'}).slideDown(jqueryslidemenu.animateduration.over)
38				},
39				function(e){
40					var $targetul=$(this).children("ul:eq(0)")
41					$targetul.slideUp(jqueryslidemenu.animateduration.out)
42				}
43			) //wayback.archive.org/web/20170102011345/http://end/ hover
44			$curobj.click(function(){
45				$(this).children("ul:eq(0)").hide()
46			})
47		}) //wayback.archive.org/web/20170102011345/http://end/ $headers.each()
48		$mainmenu.find("ul").css({display:'none', visibility:'visible'})
49	}) //wayback.archive.org/web/20170102011345/http://end/ document.ready
50}
51}
52
53//wayback.archive.org/web/20170102011345/http://build/ menu with ID="menu" on page:
54jqueryslidemenu.buildmenu("menu", arrowimages)
55/*
56     FILE ARCHIVED ON 01:13:45 Jan 02, 2017 AND RETRIEVED FROM THE
57     INTERNET ARCHIVE ON 13:54:00 Sep 06, 2017.
58     JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.
59
60     ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
61     SECTION 108(a)(3)).
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.