Top x-btn-widgetbar activation on hover/mouseover

Hi There!

I have a header widget enabled (the little triangle in the top right corner)

I want it to be visible on hover/mouseover instead of clicking, please help me with this.
Thanks

Hi @DanPR,

Thanks for reaching out.

It shouldn’t be set up that way since a hover since it could be just done with javascript, and javascript behaves differently than CSS. Example, please add this code to Theme Options > JS

jQuery ( function($) {

$(document).on('hover', '#x-btn-widgetbar.collapsed', function() {

$(this).trigger('click');

} );

} );

But since it’s a hover, it will be triggered multiple times as you move it. And you’ll not able to close it at all. I recommend not doing that with this setup unless the trigger is part of the widget bar’s container, and it’s currently not.

Thanks!

Hi @Rad,
Thank you for your quick reply, I want to use the top widget and button for countries flags and want them to behave the same like the other dropdown menu.

Hello Dan,

The code given by Rad should work and displays your header widget. If it does not work, then there must be a JS error on the page that prevents it from working. Would you mind sending us the url of you site and apply the code given by Rad so that we can investigate.

Thank you in advance.

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