So something like

<a href="http://www.someite.com";>Some External Site</a>
<a href="http://www.someotherite.com";>Some External Site 2</a>
<a href="/someotherpage.htm">Some Internal Page</a>


//This would pop an alert box that they must click to continue
$("a").click(function() {
      var ref = this.href.toLowerCase();
      if (ref.substr(0, 7) == "http://";) {
             alert("You are leaving the site.....");
      }
});

--- or. more like you asked about ---

//This would use BlockUI to show a disclaimer for 3 seconds
$("a").click(function() {
      var ref = this.href.toLowerCase();
      if (ref.substr(0, 7) == "http://";) {
             $.blockUI({ message: "You are leaving this site....." });
             setTimeout('window.location = " + ref + "', 3000);
             return false;
      }
});


And both of those would leave "inside" links alone







On Nov 4, 11:45 am, Manuel Meyer <[EMAIL PROTECTED]> wrote:
> Hey,
> is there a way of delay the delivery of a link?
> The idea I have is to display a disclaimer in case a <a>-element,  
> pointing to an external site, is clicked.
> To ensure the user can read this disclaimer, i would like to delay the  
> browser for 1 or 2 seconds, as ie Opera reacts very fast, while with  
> FF on Mac OS X I have a lot time to read it.
>
> I hoped there would be an equivalent to preventDefault(), but there  
> isnt, right?
>
> So another solution could be writing the href-attribute to a variable  
> and make the browser execute it later.
> But as I am a jQuery-newbie I dont know how to do it. Is it possible  
> at all?
>
> Thanks, Manuel

Reply via email to