Click event handler on nav items

Hi there,

I have a problem with a plugin (AJAX Login and Registration modal popup) not popping up when clicking on the nav bar.

I realized that the problem arises from a click event handler that is added by X-Theme onto the nav-bar: ul#menu-menu-top.x-nav

This click event handler is preventing propagation and therefore the plugin won´t work.

Can you tell me what this event handler is there for and if there is a way to turn it off?

I would prefer a clean solution to a javascript hack.

thanks very much

Hi There,

You can override the stopPropagation function when clicking on the AJAX Login menu items by adding this custom JS under Theme Options > JS:

Event.prototype.stopPropagation = function(){ //show the popup };
$('.x-navbar .desktop .x-nav > li.ajax-login-class > a').on('click',function(e){
  e.stopPropagation();
})

Replace the ajax-login-class with the AJAX Login menu items class.

Hope that helps and thank you for understanding.

Hi,

thanks for you answer. Your solution unfortunately didnt work for me. What did work though was taking off the event handler and triggering the popup again, in case anyone is interested.

$("#menu-menu-top .log_modal").off().click(function() {
$(document).trigger(‘lrm_show_login’);
});

cheers

Glad you were able to figure it out and thanks for sharing it with other members :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.