Reputation: 41
I would like to create a popup function where, as a user is browsing the website, a popup window would appear and ask if they need help or assistance. I have tried looking for tutorials, any help would be appreciated.
Upvotes: 1
Views: 3469
Reputation: 6383
Basically you'll need to use the setTimeout() method on page load, using the body's onLoad attribute, jquery's document.ready or any method you like. An example, using facebox as the popup plugin and jQuery's document.ready, would be:
$(document).ready(function(){
timeOut();
});
function timeOut() {
var t = setTimeout("showPopup();", 3000);
}
function showPopup() {
jQuery.facebox('whatever you want to ask');
}
Upvotes: 9