What is the syntax to get this bit of jQuery to call when say, h2.myClass is hovered?
$(document).ready(function(){
setTimeout(function(){
$("div.clickme, div.clickMeTimes").fadeOut("slow", function () {
$("div.clickme, div.clickMeTimes").remove();
});
}, 2500);
});
Thanks to all the answers, alot of them were very good but @SKS went the extra mile with my extra requirements. The below fades in my div in and out on mouse hover instead of the initial on page load.
$(document).ready(function(){
$('h2.myClass').hover (function() {
$("div.clickme, div.clickMeTimes").stop(true).fadeOut("slow");
}, function () {
$("div.clickme, div.clickMeTimes").stop(true).fadeIn("slow");
});
});