/ Published in: jQuery

If you want to simulate someone clicking on a link, use location.href. If you want to simulate an HTTP redirect, use location.replace.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// simulates similar behavior as an HTTP redirect window.location.replace("http://snipplr.com"); // simulates similar behavior as clicking on a link window.location.href = "http://snipplr.com";
Comments
