menu keep being stuck open

More
10 years 9 months ago #37872 by ivan.milic
Ok, i did not know what you mean by stuck-open. Open:

templates/milehigh/js/jquery.hjt.nav.js

this code:
Code:
jQuery('.nav li').hover(function(){ jQuery(this).find('ul:first').stop(true,true)[options.effect](options.speed); },function(){ jQuery(this).css('position', 'relative') .find('ul:first').stop(true,true)[options.effect](options.speed); });

replace with:
Code:
jQuery('.nav li').hover(function(){ jQuery(this).find('ul:first:not(:visible)').stop(true,true)[options.effect](options.speed); },function(){ if(jQuery(this).is(':visible')) jQuery(this).css('position', 'relative') .find('ul:first').stop(true,true)[options.effect](options.speed); });

Please Log in to join the conversation.

More
10 years 9 months ago #38072 by maryswave
That file only contains this code
Code:
(function(jQuery){ jQuery.fn.dropDownMenu = function(options) { var defaults = { speed: 300, effect: 'fadeToggle' }; var options = jQuery.extend(defaults, options); return this.each(function() { jQuery('.nav ul').hide(); jQuery('.nav li ul li').filter(':last-child').css('border-bottom', 'none'); jQuery('.nav li').hover(function(){ jQuery(this).find('ul:first').stop(true,true)[options.effect](options.speed); },function(){ jQuery(this).css('position', 'relative') .find('ul:first').stop(true,true)[options.effect](options.speed); }); }); }; })(jQuery);

Please Log in to join the conversation.

More
10 years 9 months ago #38081 by ivan.milic
Ok that's it:

(function(jQuery){
jQuery.fn.dropDownMenu = function(options) {

var defaults = {
speed: 300,
effect: 'fadeToggle'
};
var options = jQuery.extend(defaults, options);

return this.each(function() {

jQuery('.nav ul').hide();
jQuery('.nav li ul li').filter(':last-child').css('border-bottom', 'none');
jQuery('.nav li').hover(function(){
jQuery(this).find('ul:first').stop(true,true)[options.effect](options.speed);
},function(){
jQuery(this).css('position', 'relative')
.find('ul:first').stop(true,true)[options.effect](options.speed);
});


});
};
})(jQuery);

Please Log in to join the conversation.

More
10 years 9 months ago #38159 by maryswave
I guess what you are saying is there is no fix and I will have to use a different module. Would be nice to be able to use the menu system that comes with Sparky

Please Log in to join the conversation.

More
10 years 9 months ago #38171 by ivan.milic
???

Just replace code

Please Log in to join the conversation.

More
10 years 9 months ago #38172 by maryswave
with what??

the code I pasted in is the code already in the file

the additional code you pasted in is a duplicate of what I pasted in. I could not see a difference.

Please Log in to join the conversation.

Time to create page: 0.084 seconds
Powered by Kunena Forum