Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var $j = jQuery.noConflict();
- $j(document).ready(function(){
- /* Reponsive videos */
- $j(".content-right").fitVids();
- /* Reponsive menus */
- $j(".nav").mobileMenu();
- /* Drop down menus */
- $j(".inside-primary-nav ul li ul").parent().addClass("arrow");
- var hoverTimeout = null;
- $j(".inside-primary-nav ul li").unbind();
- $j(".inside-primary-nav ul li").hover(function(){
- $j(this).siblings().each(function(){
- $j(this).removeClass('hover').find('.sub-menu').hide();
- $j(this).find('.hover').removeClass('hover');
- });
- $j(this).addClass("hover");
- //Make sure parent style is ready to show new sub-menu
- $j(this).closest('.sub-menu').css('overflow','visible');
- $j(this).find(".sub-menu:first").stop().slideDown("fast");
- }, function(){
- if($j(this).find('.sub-menu:visible').length === 0)
- $j(this).removeClass("hover");
- });
- $j(".inside-primary-nav > ul > li").hover(function(){
- if(hoverTimeout){
- clearTimeout(hoverTimeout);
- }
- },function(){
- if($j(this).find('.sub-menu:visible').length > 0){
- var that = $j(this);
- hoverTimeout= setTimeout(function() {
- that.removeClass('hover').find('.sub-menu').hide();
- that.find('.hover').removeClass('hover');
- }, 1000);
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement