Monday, October 1, 2012

going places with JavaScript

Open a new window to another place:

$('#foo').bind('click', function () {
   window.open('http://www.example.com/','_blank');
});

 
 

Take the current window to another place:

$('#foo').bind('click', function () {
   window.location = "http://www.example.com/";
});

No comments:

Post a Comment