So I\'ve got a pretty simple button that basically toggles a form on and off - we\'ll be using this on our site since we\'re doing an update and would like feedback availabl
How about this:
$(document).ready(function() {
function changeText(){
$("#myDiv").text('test')
}
setTimeout(changeText, 2000);
});
You can achieve this by using setTimeout()
:
var timeout;
$('#feedbackLink').hover(
function() {
clearTimeout(timeout);
timeout = setTimeout(function() {
$("#feedbackLink").html('Send us a quick message!');
}, 2000); // change the HTML after 2 seconds
},
function() {
clearTimeout(timeout);
timeout = setTimeout(function() {
$("#feedbackLink").html('How can we improve this page?');
}, 2000); // change the HTML after 2 seconds
}
);