Elementor Menu and Search Field don't work with activated Microthemer

Author Posts

Thotti

Hi Sebastian,
today I made some updates on a clients site. After the updates, the menu from elementor and the search field didn’t work anymore. After deactivting all plugins and activating them again I found out, that the problem is caused by Microthemer. Wehen your plugin is activated, the console shows the following jQuery error:
Uncaught TypeError: $ is not a function
at HTMLDocument.<anonymous> (active-scripts.js:3)
at i (jquery.js:2)
at Object.fireWith [as resolveWith] (jquery.js:2)
at Function.ready (jquery.js:2)
at HTMLDocument.J (jquery.js:2)

It seems to be this jQuery function:
jQuery(document).ready(function(){

$(‘[data-filter=”all”]’).text(“Alle”);

// remove dash from bible reference – this doesn’t work because the quote is injected into the page AFTER the document.ready event.
/*var $attribution = jQuery(“.quotescollection-quote”).find(‘.attribution’);
if ($attribution.length){
$attribution.html($attribution.html().replace(/(-|–|—)/, ”));
}*/

});

When deactivating Microthemer again, all works fine. Could you please take a look on that? If you need access to the clients site, I can give you access via a private message.
Thanks
Thorsten


Sebastian

Hey Thorsten,

I would be happy to take a look at this if you don’t mind providing access via our secure contact form. However, I can tell from the error that this is due to some custom JavaScript you (or someone else) has added via Microthemer:

View > Full code editor > JS

You could change the code to:

jQuery(document).ready(function(){

jQuery(‘[data-filter=”all”]’).text(“Alle”);

// remove dash from bible reference – this doesn’t work because the quote is injected into the page AFTER the document.ready event.
/*var $attribution = jQuery(“.quotescollection-quote”).find(‘.attribution’);
if ($attribution.length){
$attribution.html($attribution.html().replace(/(-|–|—)/, ”));
}*/

});

If that doesn’t work, please provide access so I can troubleshoot properly.

Thanks,
Sebastian

You must login or register to reply to this topic.