Header widget area toggle via button or link

Hi!
I had this fixed couple of years ago, but recently noticed that widget area won’t toggle at all. I’m using Icon stack btw. So, I just updated X to latest version and that did fixed the top right corner + button to toggle widget area, however I previously had it controlled by a button via link /# before and it doesn’t work anymore.

Hi @fedulov,

Thanks for writing in.

Not sure which URL your installed the script. Would you mind sharing us the URL of the concern site. Please share us also the code that you used to execute the button to open the header widget.

Please try to test also script and plugin conflict because this might trigger the code not work properly.

You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

Let us know how it goes!

Thanks

progress-builders.com

Hi @fedulov,

If you are talking about the contact button at the very end of the page:

You will need to add the Javascript code below to X > Theme Options > JS:

jQuery('#x-content-band-23 a').on('click', function() {jQuery('#x-btn-widgetbar').trigger('click');});

If that is not what you meant, please elaborate more and give us the exact section which is supposed to open up the widgetbar.

Thank you.

Yes, for this particular button it works. What would I do if I want a menu button to do same trick?

Hi,

You can add a unique class to your menu item then use that in your js script.

jQuery('.mytrigger').on('click', function() {jQuery('#x-btn-widgetbar').trigger('click');});

Fantastic! Thanks!

You’re welcome! :slight_smile:

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