… the web site I’m trying to do this is “http://www.expo2015touristoffice.com/” ….
… also, is there a way to add images to menu items (Instead of icons)?
Thanks,
I.
Hi Jollaman,
Maybe try jQuery(‘#mega-menu-item-129 > a’).trigger(‘click’);
Alternatively try jQuery(‘#mega-menu-item-129’).addClass(‘mega-toggle-on’);
There’s no way to add images sorry (its a big job to get them images cropped and generate the unique css for each menu item), only dashicons.
Regards,
Tom
Thank you for your answer Tom, the second solution seems much better and works like a charm indeed! As regarding the images, I solved the problem with a couple CSS lines for each item, like this ….
#mega-menu-item-149 a {
padding-left: 45px !important;
}
#mega-menu-item-149 {
background: url(/wp-content/uploads/2015/03/Italy-Flag-icon-36×36.png) no-repeat 5% center !important;
}
… just in case somebody has the same problem. Thank you again Tom for your help!