I have some Javascript which displays an element on hover. I want to style this element and therefore need to trigger the hover state in the browser using Chrome Dev Tools.
This is easy to do with CSS where you can set the state of an element within Dev Tools. What is the best way to do this with Javascript?
Code Example:
$('#menu').hover(
function() {
console.log('test');
$('#dropdown').show();
},
function() {
$('#dropdown').hide();
}
);