1/********************* 2//* jQuery Drop Line Menu- By Dynamic Drive: http://www.dynamicdrive.com/ 3//* Last updated: May 9th, 11' 4//* Menu avaiable at DD CSS Library: http://www.dynamicdrive.com/style/ 5*********************/ 6 7var droplinemenu = { 8 9 arrowimage: { classname: 'downarrowclass', src: '/images/down.gif', leftpadding: 5 }, //customize down arrow image 10 animateduration: { over: 200, out: 100 }, //duration of slide in/ out animation, in milliseconds 11 12 buildmenu: function (menuid) { 13 jQuery(document).ready(function ($) { 14 var $mainmenu = $("#" + menuid + ">ul") 15 var $headers = $mainmenu.find("ul").parent() 16 $headers.each(function (i) { 17 var $curobj = $(this) 18 var $subul = $(this).find('ul:eq(0)') 19 this._dimensions = { h: $curobj.find('a:eq(0)').outerHeight() } 20 this.istopheader = $curobj.parents("ul").length == 1 ? true : false 21 if (!this.istopheader) 22 $subul.css({ left: 0, top: this._dimensions.h }) 23 var $innerheader = $curobj.children('a').eq(0) 24 $innerheader = ($innerheader.children().eq(0).is('span')) ? $innerheader.children().eq(0) : $innerheader //if header contains inner SPAN, use that 25 $innerheader.append( 26 '<img src="' + droplinemenu.arrowimage.src 27 + '" class="' + droplinemenu.arrowimage.classname
28 + '" style="border:0; padding-left: ' + droplinemenu.arrowimage.leftpadding + 'px" />' 29 ) 30 $curobj.hover( 31 function (e) { 32 var $targetul = $(this).children("ul:eq(0)") 33 if ($targetul.queue().length <= 1) //if 1 or less queued animations 34 if (this.istopheader){ 35 $targetul.css({ left: $(this).children('a').eq(0).position().left, top: $mainmenu.position().top + this._dimensions.h - 2 }) 36 } 37 //$targetul.css({ left: $mainmenu.position().left, top: $mainmenu.position().top + this._dimensions.h - 2 }) 38 if (document.all && !window.XMLHttpRequest) //detect IE6 or less, fix issue with overflow 39 $mainmenu.find('ul').css({ overflow: (this.istopheader) ? 'hidden' : 'visible' }) 40 $targetul.dequeue().stop(true, true).slideDown(droplinemenu.animateduration.over) 41 }, 42 function (e) { 43 var $targetul = $(this).children("ul:eq(0)") 44 $targetul.dequeue().stop(true, true).slideUp(droplinemenu.animateduration.out); 45 } 46 ) //end hover 47 }) //end $headers.each() 48 $mainmenu.find("ul").css({ display: 'none', visibility: 'visible', width: '250px' }) 49 }) //end document.ready 50 } 51} 52 53/*********************************************************************************************************************** 54DOCUMENT: includes/javascript.js 55DEVELOPED BY: Ryan Stemkoski 56COMPANY: Zipline Interactive 57EMAIL: [email protected] 58PHONE: 509-321-2849 59DATE: 3/26/2009 60UPDATED: 3/25/2010 61DESCRIPTION: This is the JavaScript required to create the accordion style menu. Requires jQuery library 62NOTE: Because of a bug in jQuery with IE8 we had to add an IE stylesheet hack to get the system to work in all browsers. I hate hacks but had no choice :(. 63************************************************************************************************************************/ 64$(document).ready(function () { 65 66 //ACCORDION BUTTON ACTION (ON CLICK DO THE FOLLOWING) 67 $('.accordionButton, .menuButtonDrop, .menuButton').click(function () { 68 69 //REMOVE THE ON CLASS FROM ALL BUTTONS 70 $('.accordionButton, .menuButtonDrop, .menuButton').removeClass('on'); 71 //$('.accordionButton').find('a').attr('aria-expanded','false');//01082026 72 73 $('.accordionButton, .menuButtonDrop, .menuButton a[aria-expanded]').attr('aria-expanded','false');//01082026 74 75 $(this).find('a').attr('aria-expanded','false');// added by ni 76 77 //Remove the role attribute from all accordionbutton link 78 //$('.accordionButton').attr("role", "menuitem");// commented by ni 79 80 //NO MATTER WHAT WE CLOSE ALL OPEN SLIDES 81 $('.accordionContent, .submenu').slideUp('normal'); 82 //give the atribute to all the submenus 83 $('.accordionContent, .submenu').attr("aria-hidden", "true"); 84 85 //IF THE NEXT SLIDE WASN'T OPEN THEN OPEN IT 86 if ($(this).next().is(':hidden') == true) { 87 88 //ADD THE ON CLASS TO THE BUTTON 89 //$(this).addClass('on'); 90 $(this).find('a').attr('aria-expanded','true');// added by ni 91 92 //give the opened slides attribute 93 $(this).next().attr("aria-hidden", "false"); 94 setTimeout(()=>{ 95 // Toggle current submenu 96 //OPEN THE SLIDE 97 $(this).next().slideDown('normal'); 98 //ADD THE ON CLASS TO THE BUTTON 99 $(this).addClass('on'); 100 },200); 101 //$(this).children().attr("role", "submenu"); 102 // $(this).attr("role", "submenu");// commented by ni 103 // $(this).next().focus(); 104 } 105 106 }); 107 108 109 /*** REMOVE IF MOUSEOVER IS NOT REQUIRED ***/ 110 111 //ADDS THE .OVER CLASS FROM THE STYLESHEET ON MOUSEOVER 112 $('.accordionButton, .menuButton').mouseover(function () { 113 $(this).addClass('over'); 114 115 //ON MOUSEOUT REMOVE THE OVER CLASS 116 }).mouseout(function () { 117 $(this).removeClass('over'); 118 }); 119 120 /*** END REMOVE IF MOUSEOVER IS NOT REQUIRED ***/ 121 122 123 /******************************************************************************************************************** 124 CLOSES ALL S ON PAGE LOAD 125 ********************************************************************************************************************/ 126 $('.accordionContent, .submenu').hide(); 127 $('.accordionContent, .submenu').attr("aria-hidden", "true"); 128}); 129 130//TABS 131 132(function ($) { 133 134 $.organicTabs = function (el, options) { 135 136 var base = this; 137 base.$el = $(el); 138 base.$nav = base.$el.find(".nav"); 139 140 base.init = function () { 141 142 base.options = $.extend({}, $.organicTabs.defaultOptions, options); 143 144 // Accessible hiding fix 145 $(".hide").css({ 146 "position": "relative", 147 "top": 0, 148 "left": 0, 149 "display": "none" 150 }); 151 152 base.$nav.delegate("li > a", "click", function () { 153 154 // Figure out current list via CSS class 155 var curList = base.$el.find("a.current").attr("href").substring(1), 156 157 // List moving to 158 $newList = $(this), 159 160 // Figure out ID of new list 161 listID = $newList.attr("href").substring(1), 162 163 // Set outer wrapper height to (static) height of current inner list 164 $allListWrap = base.$el.find(".list-wrap"), 165 curListHeight = $allListWrap.height(); 166 $allListWrap.height(curListHeight); 167 168 if ((listID != curList) && (base.$el.find(":animated").length == 0)) { 169 //base.$el.find(".nav li a").attr('aria-selected','false'); 170 //$newList.attr('aria-selected','true'); 171 // Fade out current list 172 base.$el.find("#" + curList).fadeOut(base.options.speed, function () { 173 174 // Fade in new list on callback 175 base.$el.find("#" + listID).fadeIn(base.options.speed); 176 177 // Adjust outer wrapper to fit new list snuggly 178 var newHeight = base.$el.find("#" + listID).height(); 179 $allListWrap.animate({ 180 height: newHeight 181 }); 182 183 // Remove highlighting - Add to just-clicked tab 184 base.$el.find(".nav li a").removeClass("current"); 185 $newList.addClass("current"); 186 base.$el.find(".nav li a").attr('aria-selected','false');// added by ni 187 //base.$el.find(".nav li a").removeAttribute('aria-current','');// added by ni 188 $newList.attr('aria-selected','true');// added by ni 189 //$newList.setAttribute('aria-current','page');// added by ni 190 }); 191 192 193 } 194 195 // Don't behave like a regular link 196 // Stop propegation and bubbling 197 return false; 198 }); 199 200 }; 201 base.init(); 202 }; 203 204 $.organicTabs.defaultOptions = { 205 "speed": 300 206 }; 207 208 $.fn.organicTabs = function (options) { 209 return this.each(function () { 210 (new $.organicTabs(this, options)); 211 }); 212 }; 213 214})(jQuery); 215 216//TABS HEAD 217$(function () { 218 219 $("#example-one").organicTabs(); 220 221 $("#example-two").organicTabs({ 222 "speed": 200 223 });
224 225}); 226 227 228 229//DROP DOWN MENU 230droplinemenu.buildmenu("mydroplinemenu") 231 232 233
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.