When hovering over an menu item with submenu pages in the wordpress backend a “tooltip” showing each submenu page is popping up.
How can I get rid of these?
What I’ve tried so far: Removing the wp-has-submenu
style class. This works – kinda. When hovering the tooltip doesnt appear anymore. On mousedown on an item the tooltip still appears.
$('#adminmenu').children('li').each(function () {
$(this).removeClass('wp-has-submenu');
// removing or changing the value of the 'aria-haspopup' attr doesn't solve the problem. Not sure what the attr is for
// $(this).children('a').each(function(){
// $(this).attr('aria-haspopup', 'false');
// });
});
Update1
Well okay this seems to be pure javascript and no jQuery. I’ve removed any event bindings from any element. Still showing tooltips.
$('html').find("*").each(function () {
$(this).off();
$(this).unbind();
});
AFAIK and a short google you can’t remove pure js event handlers without a reference to the actual handler.
Update2
Hmm looking through /wp-admin/js/
it seems everything or at least very much is done in jQuery.. So.. I’m running out of ideas
Update3
After searching/looking and editing a lot of .js files I decided to delete /wp-admin/js
and /wp-includes/js
. IT IS STILL APPEARING. Holy .. what the heck are they doin.
Update 4
This seems to work
.js #adminmenu .opensub .wp-submenu {
display:none !important;
}
Yes,your code is working now. But I ‘m describing here a simple way for adding this code in our theme and it will remove the hover effect in admin section.
Follow the steps.
Now it will works.If need anything else then please let me know.