Delayed Dialog Call...

Delayed Dialog Call...

Hi all,

I have a javascript that invokes a DIALOG with a image and a BIO description. Originally, I had this script trigger by a CLICK, but my client said they would rather have it invoked by a HOVER. They like the HOVER effect, but now they are complaining that they would like a DELAY before the HOVER trigger takes place. Right now you can drag the cursor over one on the links and the DIALOG is triggered.

Is there a way to make sure that the cursor has rested on the LINK for at least 1.5 seconds, then perform the HOVER script? Can a few lines be added to my CODE to cause a DELAY to happen? To be ultra clear, if I hover on a link for LESS THEN 1.5 seconds and move off, I do not want the dialog to trigger.

Appreciate any help. Here is my code to call the dialog:

  1. $(".bio_link").hover(
  2. function()
  3. {
  4. $("body").prepend('<div id="biodialog"></div>');
  5. // Define the you tube modal dialog properties
  6.     $("#biodialog").dialog({
  7.         modal: true,
  8.         width: 530,
  9.         height: 457,
  10.         autoOpen: false,
  11.         position: { my: "center top", at: "center top+50", of: window }
  12.     });
  13.     $('#biodialog').dialog({
  14.         buttons:{
  15.             "Close": function(){
  16.                 $(this).dialog("close");
  17.             }
  18.         }
  19.     });
  20.     $("#biodialog").dialog({ title: $(this).attr("title") });
  21. $("#biodialog").html($('#divB'+ $(this).attr("data")).html());
  22. $("#biodialog").dialog("open");
  23. $("body").remove("#biodialog");
  24. return false;
  25. }
  26. );