Advertisement
Guest User

$.href for jQuery

a guest
Apr 17th, 2011
675
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $.ev = function(e) {
  2.     return e || window.event || {};
  3. };
  4.  
  5. $.reload = function() {
  6.     window.location.reload();
  7. };
  8.  
  9. $.back = function() {
  10.     (!history.previous && window.opener) ? window.close() : history.back();
  11. };
  12.  
  13. $.forward = function() {
  14.     history.forward();
  15. };
  16.  
  17. $.href = function(url, openwin) {
  18.     if (url)
  19.         ((openwin || $.ev().shiftKey) ? window.open(url) : window.location.href=url);
  20.     else
  21.         return window.location.href;
  22. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement