1/** 2 * @copyright Copyright (C) 2012 Cedric KEIFLIN alias ced1870 3 * https://www.joomlack.fr 4 * Module Maximenu CK 5 * @license GNU/GPL 6 * */ 7 8(function($) { 9 10 //define the defaults for the plugin and how to call it 11 $.fn.DropdownMaxiMenu = function(options) { 12 //set default options 13 var defaults = { 14 fxtransition: 'linear', 15 fxduration: 500, 16 menuID: 'maximenuck', 17 testoverflow: '0', 18 orientation: 'horizontal', 19 behavior: 'mouseover', 20 opentype: 'open', 21 direction: 'normal', 22 directionoffset1: '30', 23 directionoffset2: '30', 24 dureeIn: 0, 25 dureeOut: 500, 26 ismobile: false, 27 menuposition: '0', 28 showactivesubitems: '0', 29 topfixedeffect: '1', 30 topfixedoffset: '', 31 clickclose: '0', 32 effecttype: 'dropdown', 33 closeclickoutside: '0' 34 }; 35 36 //call in the default otions 37 var options = $.extend(defaults, options); 38 var maximenuObj = this; 39 40 //act upon the element that is passed into the design 41 return maximenuObj.each(function(options) { 42 43 var fxtransition = defaults.fxtransition; 44 var fxduration = defaults.fxduration; 45 var dureeOut = defaults.dureeOut; 46 var dureeIn = defaults.dureeIn; 47 // var useOpacity = defaults.useOpacity; 48 var menuID = defaults.menuID; 49 var orientation = defaults.orientation; 50 var behavior = defaults.behavior; 51 var opentype = defaults.opentype; 52 var fxdirection = defaults.fxdirection; 53 var directionoffset1 = defaults.directionoffset1; 54 var directionoffset2 = defaults.directionoffset2; 55 var ismobile = defaults.ismobile; 56 var showactivesubitems = defaults.showactivesubitems; 57 var testoverflow = defaults.testoverflow; 58 var effecttype = defaults.effecttype; 59 var transitiontype = 0; 60 var status = new Array(); 61 62 maximenuInit(); 63 64 if (defaults.menuposition == 'topfixed') { 65 var menuy = $(this).offset().top; 66 $(document.body).attr('data-margintop', $(document.body).css('margin-top')); 67 maximenuObj.menuHeight = $(this).height(); 68 $(window).bind('scroll', function() { 69 var topfixedoffset = menuy; 70 if (defaults.topfixedoffset) { 71 if (isNumeric(defaults.topfixedoffset)) { 72 topfixedoffset = menuy + parseInt(defaults.topfixedoffset); 73 } else { 74 topfixedoffset = parseInt($(defaults.topfixedoffset).offset().top); 75 } 76 } 77 if ($(window).scrollTop() > topfixedoffset && !maximenuObj.hasClass('maximenufixed')) { 78 if (defaults.topfixedeffect == '0') { 79 maximenuObj.after('<div id="'+maximenuObj.attr('id')+'tmp"></div>') 80// $('#'+maximenuObj.attr('id')+'tmp').css('visibility', 'hidden').html(maximenuObj.html()); 81 $('#'+maximenuObj.attr('id')+'tmp').css('visibility', 'hidden').height(maximenuObj.height()); 82 maximenuObj.addClass('maximenufixed'); 83// $(document.body).css('margin-top', parseInt(maximenuObj.menuHeight)); 84 } else { 85 maximenuObj.css('opacity', '0').css('margin-top', '-' + parseInt(maximenuObj.height()) + 'px').animate({'opacity': '1', 'margin-top': '0'}, 500).addClass('maximenufixed'); 86 $(document.body).css('margin-top', parseInt(maximenuObj.menuHeight)); 87 } 88 } else if ($(window).scrollTop() <= menuy) { 89 $(document.body).css('margin-top', $(document.body).attr('data-margintop')); 90 maximenuObj.removeClass('maximenufixed'); 91 $('#'+maximenuObj.attr('id')+'tmp').remove(); 92 } 93 }); 94 } else if (defaults.menuposition == 'bottomfixed') { 95 $(this).addClass('maximenufixed').find('ul.maximenuck').css('position', 'static'); 96 } 97 98 function isNumeric(n) { 99 return !isNaN(parseFloat(n)) && isFinite(n); 100 } 101 102 function openMaximenuck(el) { 103 if ((el.data('status') == 'opened' ) 104 || (status[el.data('level') - 1] == 'showing' && opentype == 'drop') 105 ) 106 return; 107 // if (el.hasClass('fullwidth') && maximenuObj.hasClass('maximenuckh') ) { 108 // el.submenu.css('display', 'block').css('left', '0'); 109 // } else { 110 el.submenu.css('display', 'block'); 111 // } 112 // el.submenuHeight = el.submenu.height(); 113 if (effecttype == 'pushdown') { 114 el.submenu.css('position','relative'); 115 } 116 if (opentype != 'noeffect') 117 status[el.data('level')] = 'showing'; 118 119 switch (opentype) { 120 case 'noeffect': 121 status[el.data('level')] = ''; 122 el.data('status', 'opened'); 123 break; 124 case 'slide': 125 if (el.data('status') == 'opening') 126 break; 127 el.data('status', 'opening'); 128 el.submenu.css('overflow', 'hidden'); 129 el.submenu.stop(true, true); 130 slideconteneur = $('.maximenuck2', el); 131 if (el.hasClass('level1') && orientation == 'horizontal') { 132 slideconteneur.css('marginTop', -el.submenuHeight); 133 slideconteneur.animate({ 134 marginTop: 0 135 }, {
136 duration: fxduration, 137 queue: false, 138 easing: fxtransition, 139 complete: function() { 140 status[el.data('level')] = ''; 141 el.submenu.css('overflow', 'visible'); 142 el.data('status', 'opened'); 143 } 144 }); 145 el.submenu.animate({ 146 'max-height': el.submenuHeight 147 }, { 148 duration: fxduration, 149 queue: false, 150 easing: fxtransition, 151 complete: function() { 152 $(this).css('max-height', ''); 153 status[el.data('level')] = ''; 154 el.submenu.css('overflow', 'visible'); 155 el.data('status', 'opened'); 156 hideSubmenuckOutsideClick(el); 157 } 158 }); 159 } else { 160 slideconteneur.css('marginLeft', -el.submenu.width()); 161 slideconteneur.animate({ 162 marginLeft: 0 163 }, { 164 duration: fxduration, 165 queue: false, 166 easing: fxtransition, 167 complete: function() { 168 status[el.data('level')] = ''; 169 el.submenu.css('overflow', 'visible'); 170 el.data('status', 'opened'); 171 // hideSubmenuckOutsideClick(el); 172 } 173 }); 174 el.submenu.animate({ 175 'max-width': el.submenu.width() 176 }, { 177 duration: fxduration, 178 queue: false, 179 easing: fxtransition, 180 complete: function() { 181 status[el.data('level')] = ''; 182 el.submenu.css('overflow', 'visible'); 183 el.data('status', 'opened'); 184 hideSubmenuckOutsideClick(el); 185 } 186 }); 187 } 188 break; 189 case 'show': 190 el.data('status', 'opening'); 191 el.submenu.hide(); 192 el.submenu.stop(true, true); 193 el.submenu.show(fxduration, fxtransition, { 194 complete: function() { 195 status[el.data('level')] = ''; 196 el.data('status', 'opened'); 197 hideSubmenuckOutsideClick(el); 198 } 199 }); 200 el.data('status', 'opened'); 201 break; 202 case 'fade': 203 el.data('status', 'opening'); 204 el.submenu.hide(); 205 el.submenu.stop(true, true); 206 el.submenu.fadeIn(fxduration, fxtransition, { 207 complete: function() { 208 status[el.data('level')] = ''; 209 el.data('status', 'opened'); 210 hideSubmenuckOutsideClick(el); 211 } 212 }); 213 el.data('status', 'opened'); 214 break; 215 case 'scale': 216 el.data('status', 'opening'); 217 if (!el.hasClass('level1') || orientation == 'vertical') { 218 el.submenu.css('margin-left',el.submenu.width()); 219 } 220 el.submenu.hide(); 221 el.submenu.stop(true, true); 222 el.submenu.show("scale", { 223 duration: fxduration, 224 easing: fxtransition, 225 complete: function() { 226 status[el.data('level')] = ''; 227 el.data('status', 'opened'); 228 hideSubmenuckOutsideClick(el); 229 } 230 }); 231 el.data('status', 'opened'); 232 break; 233 case 'puff': 234 el.data('status', 'opening'); 235 if (!el.hasClass('level1') || orientation == 'vertical') { 236 el.submenu.css('margin-left',el.submenu.width()); 237 } 238 el.submenu.stop(true, true); 239 el.submenu.show("puff", { 240 duration: fxduration, 241 easing: fxtransition, 242 complete: function() { 243 status[el.data('level')] = ''; 244 // el.data('status','opened'); 245 hideSubmenuckOutsideClick(el); 246 } 247 }); 248 el.data('status', 'opened'); 249 break; 250 case 'drop': 251 el.data('status', 'opening'); 252 if (!el.hasClass('level1') || orientation == 'vertical') { 253 el.submenu.css('margin-left',el.submenu.width()); 254 } 255 el.submenu.stop(true, true); 256 if (el.hasClass('level1') && orientation == 'horizontal') { 257 if (fxdirection == 'inverse') { 258 dropdirection = 'down'; 259 el.submenu.css('bottom', directionoffset1 + 'px'); 260 } else { 261 dropdirection = 'up'; 262 } 263 } else { 264 if (fxdirection == 'inverse') { 265 dropdirection = 'right'; 266 el.submenu.css('right', directionoffset2 + 'px'); 267 } else { 268 el.submenu.css('margin-left',el.submenu.width()); 269 dropdirection = 'left'; 270 } 271 } 272 el.submenu.show("drop", { 273 direction: dropdirection, 274 duration: fxduration, 275 easing: fxtransition, 276 complete: function() { 277 status[el.data('level')] = ''; 278 // el.data('status','opened'); 279 hideSubmenuckOutsideClick(el); 280 } 281 }); 282 el.data('status', 'opened'); 283 break; 284 case 'open': 285 default: 286 el.data('status', 'opening'); 287 el.submenu.stop(); 288 el.submenu.css('overflow', 'hidden'); 289 if (el.hasClass('level1') && orientation == 'horizontal') { 290 el.submenu.animate({ 291 'max-height': el.submenuHeight 292 }, {
293 duration: fxduration, 294 queue: false, 295 easing: fxtransition, 296 complete: function() { 297 $(this).css('max-height', ''); 298 status[el.data('level')] = ''; 299 if (effecttype == 'dropdown') el.submenu.css('overflow', 'visible'); 300 el.data('status', 'opened'); 301 hideSubmenuckOutsideClick(el); 302 } 303 }); 304 } else { 305 el.submenu.animate({ 306 'max-width': el.submenu.width() 307 }, { 308 duration: fxduration, 309 queue: false, 310 easing: fxtransition, 311 complete: function() { 312 $(this).css('max-width', ''); 313 status[el.data('level')] = ''; 314 if (effecttype == 'dropdown') el.submenu.css('overflow', 'visible'); 315 el.data('status', 'opened'); 316 hideSubmenuckOutsideClick(el); 317 } 318 }); 319 } 320 break; 321 } 322 } 323 324 function closeMaximenuck(el) { 325 el.submenu.stop(true, true); 326 status[el.data('level')] = ''; 327 el.data('status', 'closing'); 328 switch (opentype) { 329 case 'noeffect': 330 el.submenu.css('display', 'none'); 331 // el.submenu.css('position','absolute'); 332 status[el.data('level')] = ''; 333 el.data('status', 'closed'); 334 break; 335 case 'fade': 336 el.submenu.fadeOut(fxduration, fxtransition, { 337 complete: function() { 338 status[el.data('level')] = ''; 339 el.data('status', 'closed'); 340 } 341 }); 342 el.data('status', 'closed'); 343 break; 344 case 'slide': 345 if (el.hasClass('level1') && orientation == 'horizontal') { 346 el.submenu.css('max-height', ''); 347 } else { 348 el.submenu.css('max-width', ''); 349 } 350 el.submenu.css('display', 'none'); 351 el.submenu.css('position','absolute'); 352 status[el.data('level')] = ''; 353 el.data('status', 'closed'); 354 break; 355 case 'open': 356 el.submenu.stop(); 357 el.submenuHeight = el.submenu.height(); 358 status[el.data('level')] = ''; 359 el.submenu.css('overflow', 'hidden'); 360 el.data('status','closing'); 361 if (el.hasClass('level1') && orientation == 'horizontal') { 362 el.submenu.css('overflow', 'hidden').css('max-height', el.submenu.height()).animate({ 363 'max-height': 0 364 }, { 365 duration: fxduration, 366 queue: false, 367 easing: fxtransition, 368 complete: function() { 369 el.submenu.css('max-height', ''); 370 el.submenu.css('display', 'none'); 371 el.submenu.css('position','absolute'); 372 status[el.data('level')] = ''; 373 el.data('status', 'closed'); 374 } 375 }); 376 } else { 377 el.submenu.css('max-width', ''); 378 el.submenu.css('display', 'none'); 379 el.submenu.css('position','absolute'); 380 status[el.data('level')] = ''; 381 el.data('status', 'closed'); 382 } 383 break; 384 default: 385 case 'drop': 386 el.submenu.hide(0, { 387 complete: function() { 388 status[el.data('level')] = ''; 389 el.data('status', 'closed'); 390 } 391 }); 392 el.data('status', 'closed'); 393 break; 394 } 395 } 396 397 function showSubmenuck(el) { 398 el.css('z-index', 15000); 399 el.submenu.css('z-index', 15000); 400 clearTimeout(el.timeout); 401 el.timeout = setTimeout(function() { 402 openMaximenuck(el); 403 }, dureeIn); 404 } 405 406 function hideSubmenuck(el) { 407 if (effecttype == 'pushdown' && el.data('status') != 'closing') { 408 closeMaximenuck(el); 409 } else if (effecttype != 'pushdown') { 410 el.css('z-index', 12001); 411 el.submenu.css('z-index', 12001); 412 clearTimeout(el.timeout); 413 el.timeout = setTimeout(function() { 414 closeMaximenuck(el); 415 }, dureeOut); 416 } 417 } 418 419 function testOverflowmenuck(el) { 420 if (el.hasClass('fullwidth')) return; 421 var pageWidth = $(window).outerWidth(); 422 el.submenu.removeClass('fixRight').css('right', ''); 423 var elOffset = el.submenu.attr('data-display', el.submenu.css('display')).css({'opacity':'0','display':'block'}).offset(); 424 el.submenu.css({'opacity':'1', 'display': el.submenu.attr('data-display')}); 425 el.submenu.removeAttr('data-display'); 426 427 var elementPositionX = elOffset.left + el.submenu.width(); 428 if (elementPositionX > pageWidth) { 429 if ((el.data('level')) == 1) { 430 el.submenu.css('right', '0px'); 431 } else { 432 el.submenu.css('right', el.outerWidth()); 433 } 434 el.submenu.css('marginRight', '0px'); 435 el.submenu.addClass('fixRight'); 436 } else { 437 el.submenu.removeClass('fixRight'); 438 el.submenu.css('right', ''); 439 } 440 441 if (orientation != 'vertical') return; 442 var boundTop = $(document).scrollTop(); 443 var boundBottom = boundTop + $(window).height(); 444 445 var elementPositionY = elOffset.top + el.submenu.height(); 446 elDataMarginTop = el.submenu.attr('data-margin-top') ? parseInt(el.submenu.attr('data-margin-top')) : parseInt(el.submenu.css('margin-top')); 447 if (elementPositionY >
447 boundBottom) { 448 el.submenu.attr('data-margin-top', el.submenu.css('margin-top')).css('margin-top', '-=' + (elementPositionY - boundBottom + 10) + 'px'); 449 } else if (elOffset.top + el.submenu.height() - (parseInt(el.submenu.css('margin-top')) - elDataMarginTop) < boundBottom) { 450 if (el.submenu.attr('data-margin-top')) el.submenu.css('margin-top', elDataMarginTop + 'px').removeAttr('data-margin-top'); 451 } 452 } 453 454 function hideSubmenuckOutsideClick(el) { 455 if (defaults.closeclickoutside == '0') return; 456 $(window).one("click", function(event){ 457 if ( 458 el.hasClass('clickedck') 459 && 460 el.submenu.has(event.target).length == 0 //checks if descendants of submenu was clicked 461 && 462 !el.submenu.is(event.target) //checks if the submenu itself was clicked 463 && 464 !el.is(event.target) //checks if the submenu itself was clicked 465 ){ 466 // is outside 467 // submenu.hide('fast').removeClass('opened'); 468 hideSubmenuck(el); 469 } else { 470 // is inside, do nothing 471 hideSubmenuckOutsideClick(el); 472 } 473 }); 474 } 475 476 function maximenuInit() { 477 if (effecttype == 'pushdown') { 478 $('li.maximenuck.level1', maximenuObj).each(function(i, el) { 479 if (!$(el).hasClass('parent')) { 480 $(el).mouseenter(function() { 481 $('li.maximenuck.level1.parent', maximenuObj).each(function(j, el2) { 482 el2 = $(el2); 483 if ($(el).prop('class') != el2.prop('class')) { 484 el2.submenu = $('> .maxipushdownck > .floatck',maximenuObj).eq(j); 485 hideSubmenuck(el2); 486 } 487 }); 488 }); 489 } 490 }); 491 els = $('li.maximenuck.level1.parent', maximenuObj); 492 } else { 493 els = $('li.maximenuck.parent', maximenuObj); 494 } 495 els.each(function(i, el) { 496 el = $(el); 497 // test if dropdown is required 498 if (el.hasClass('nodropdown')) { 499 return true; 500 } 501 // manage item level 502 if (el.hasClass('level1')) 503 el.data('level', 1); 504 $('li.maximenuck.parent', el).each(function(j, child) { 505 $(child).data('level', el.data('level') + 1); 506 }); 507 // manage submenus 508 if (effecttype == 'pushdown') { 509 el.submenu = $('> .maxipushdownck > .floatck',maximenuObj).eq(i); 510 el.submenu.find('> .maxidrop-main') 511 .css('width','inherit') 512 .css('overflow','hidden'); 513 el.submenu.hover(function() {el.addClass('hover');}, function() {el.removeClass('hover');}); 514 } else { 515 el.submenu = $('> .floatck', el); 516 el.submenu.css('position', 'absolute'); 517 el.addClass('maximenuckanimation'); 518 } 519 el.submenuHeight = el.submenu.height(); 520 el.submenuWidth = el.submenu.width(); 521 522 if (opentype == 'noeffect' || opentype == 'open' || opentype == 'slide') { 523 el.submenu.css('display', 'none'); 524 } else { 525 el.submenu.css('display', 'block'); 526 el.submenu.hide(); 527 } 528 529 // if (opentype == 'open' || opentype == 'slide') { 530 // if (el.hasClass('level1') && orientation == 'horizontal') { 531 // el.submenu.css('max-height', '0'); 532 // } else { 533 // el.submenu.css('max-width', '0'); 534 // } 535 // } 536 //manage active submenus 537 if ( (showactivesubitems == '1' && el.hasClass('active')) || el.hasClass('openck')) { 538 if (el.hasClass('fullwidth')) { 539 el.submenu.css('display', 'block'); 540 if (orientation == 'horizontal') el.submenu.css('left', '0'); 541 } else { 542 el.submenu.css('display', 'block'); 543 } 544 el.submenu.css('max-height', ''); 545 el.submenu.show(); 546 } 547 // manage inverse direction 548 if (fxdirection == 'inverse' && el.hasClass('level1') && orientation == 'horizontal') 549 el.submenu.css('bottom', directionoffset1 + 'px'); 550 if (fxdirection == 'inverse' && el.hasClass('level1') && orientation == 'vertical') 551 el.submenu.css('right', directionoffset1 + 'px'); 552 if (fxdirection == 'inverse' && !el.hasClass('level1') && orientation == 'vertical') 553 el.submenu.css('right', directionoffset2 + 'px'); 554 555 var itembehavior = el.hasClass('showonclick') ? (el.hasClass('clickclose') ? 'showonclickclose' : 'click') : (el.hasClass('clickclose') ? 'clickclose' : behavior); 556 if (itembehavior == 'showonclickclose') { 557 $('> a.maximenuck,> span.separator,> span.nav-header', el).click(function(e) { 558 e.preventDefault(); 559 if (testoverflow == '1') 560 testOverflowmenuck(el); 561 // $('li.maximenuck.parent.level' + el.data('level'), maximenuObj).each(function(j, el2) { 562 // el2 = $(el2); 563 // if (el.prop('class') != el2.prop('class')) { 564 // if (effecttype == 'pushdown') { 565 // el2.submenu = $('> .maxipushdownck > .floatck',maximenuObj).eq(j); 566 // } else { 567 // el2.submenu = $('> .floatck', el2); 568 // } 569 // hideSubmenuck(el2); 570 // } 571 // }); 572 $('li.maximenuck', $(el)).removeClass('clickedck').removeClass('openck'); 573 $(el).removeClass('clickedck').removeClass('openck'); 574 hideSubmenuck(el); 575 $('li.maximenuck.parent:not(.nodropdown)', el).each(function(j, el2) { 576 el2 = $(el2); 577 if (el.prop('class') != el2.prop('class')) { 578 if (effecttype == 'pushdown') { 579 el2.submenu = $('> .maxipushdownck > .floatck',maximenuObj).eq(j); 580 } else { 581 el2.submenu = $('> .floatck', el2); 582 } 583 hideSubmenuck(el2); 584 } 585 }); 586 showSubmenuck(el); 587 }); 588 589 $('> .maxiclose', el.submenu).click(function() { 590 hideSubmenuck(el); 591 el.removeClass('clickedck'); 592 }); 593 } else if (itembehavior == 'clickclose') { 594 el.mouseenter(function() { 595 if (testoverflow == '1') 596 testOverflowmenuck(el); 597 $('li.maximenuck.parent.level' + el.data('level'), maximenuObj).each(function(j, el2) { 598 el2 = $(el2); 599 if (el.prop('class') != el2.prop('class')) { 600 if (effecttype == 'pushdown') { 601 el2.submenu = $('> .maxipushdownck > .floatck',maximenuObj).eq(j); 602 } else { 603 el2.submenu = $('> .floatck', el2); 604 } 605 // el2.data('status','closed'); 606 // status[el2.data('level')] = ''; 607 hideSubmenuck(el2); 608 } 609 }); 610 showSubmenuck(el); 611 }); 612 613 $('> div > .maxiclose', el).click(function() { 614 hideSubmenuck(el); 615 el.removeClass('clickedck'); 616 }); 617 } else if (itembehavior == 'click') { 618 if (el.hasClass('parent') && $('> a.maximenuck', el).length) { 619 el.redirection = $('> a.maximenuck', el).prop('href'); 620 $('> a.maximenuck', el).each(function() { 621 $(this).attr('data-href', $(this).attr('href')); 622 $(this).attr('href', 'javascript:void(0)'); 623 }); 624 el.hasBeenClicked = false;
625 } 626 627 $('> a.maximenuck,> span.separator,> span.nav-header', el).click(function() { 628 // event.stopPropagation(); 629 // set the redirection again for mobile 630 // if (el.hasBeenClicked == true && ismobile) { 631 // el.getFirst('a.maximenuck').setProperty('href',el.redirection); 632 // } 633 // el.hasBeenClicked = true; 634 $('li.maximenuck.level' + $(el).attr('data-level'), maximenuObj).removeClass('clickedck').removeClass('openck'); 635 el.addClass('clickedck'); 636 if (testoverflow == '1') 637 testOverflowmenuck(el); 638 if (el.data('status') == 'opened') { 639 $('li.maximenuck', $(el)).removeClass('clickedck').removeClass('openck'); 640 $(el).removeClass('clickedck').removeClass('openck'); 641 hideSubmenuck(el); 642 $('li.maximenuck.parent:not(.nodropdown)', el).each(function(j, el2) { 643 el2 = $(el2); 644 if (el.prop('class') != el2.prop('class')) { 645 if (effecttype == 'pushdown') { 646 el2.submenu = $('> .maxipushdownck > .floatck',maximenuObj).eq(j); 647 } else { 648 el2.submenu = $('> .floatck', el2); 649 } 650 hideSubmenuck(el2); 651 } 652 }); 653 } else { 654 $('li.maximenuck.parent.level' + el.data('level'), maximenuObj).each(function(j, el2) { 655 el2 = $(el2); 656 if (el.prop('class') != el2.prop('class')) { 657 if (effecttype == 'pushdown') { 658 el2.submenu = $('> .maxipushdownck > .floatck',maximenuObj).eq(j); 659 } else { 660 el2.submenu = $('> .floatck', el2); 661 } 662 hideSubmenuck(el2); 663 } 664 }); 665 showSubmenuck(el); 666 } 667 }); 668 $('> .maxiclose', el.submenu).click(function() { 669 hideSubmenuck(el); 670 el.removeClass('clickedck'); 671 }); 672 } else { 673 el.mouseenter(function() { 674 if (effecttype == 'pushdown') { 675 $('li.maximenuck.level1.parent', maximenuObj).each(function(j, el2) { 676 el2 = $(el2); 677 if (el.prop('class') != el2.prop('class')) { 678 el2.submenu = $('> .maxipushdownck > .floatck',maximenuObj).eq(j); 679 hideSubmenuck(el2); 680 } 681 }); 682 } else { 683 if (testoverflow == '1') 684 testOverflowmenuck(el); 685 } 686 showSubmenuck(el); 687 }); 688 if (effecttype == 'pushdown' && defaults.clickclose != '1') { 689 maximenuObj.mouseleave(function() { 690 hideSubmenuck(el); 691 }); 692 } else if (defaults.clickclose != '1') { 693 el.mouseleave(function() { 694 hideSubmenuck(el); 695 el.find('li.maximenuck.parent.level'+el.attr('data-level')+':not(.nodropdown)').each(function(j, el2) { 696 el2 = $(el2); 697 if (effecttype == 'pushdown') { 698 el2.submenu = $('> .maxipushdownck > .floatck',maximenuObj).eq(j); 699 } else { 700 el2.submenu = $('> .floatck', el2); 701 } 702 hideSubmenuck(el2); 703 }); 704 }); 705 } 706 $('> .maxiclose', el.submenu).click(function() { 707 hideSubmenuck(el); 708 el.removeClass('clickedck'); 709 }); 710 } 711 }); 712 713 } 714 }); 715 }; 716})(jQuery); 717 718// jQuery(document).ready(function($){ 719// $('#maximenuck').DropdownMaxiMenu({ 720// }); 721// });
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.