window panel
by LW
HTML
<p><a class="current">current</a></p>
<p><a class="new">new</a></p>
<p><a class="confirm">new with confirm</a></p>
<p><a class="reload">reload</a></p>
<p><a class="open">open</a></p>
CSS
a { cursor:pointer; }
JavaScript
$('.current').click(function(){
window.location.href = 'http://www.google.com'; //This will open Google in a same tab.
});
$('.new').click(function(){
window.open('http://www.google.com'); //This will open Google in a new tab.
});
$('.reload').click(function(){
window.location.reload(true); //This will reload the current page
});
if(document.location.href.indexOf('narensrinivasans') > -1 ) {
alert('url contains narensrinivasans');
}
$('.open').click(function(){
var left = ($(window).width()/2)-(640/2),
top = ($(window).height()/2)-(480/2),
popup = window.open ("http://twitter.com/intent/tweet", "popup", "width=640, height=480, top="+top+", left="+left);
});
$('.confirm').click(function(){
var con=confirm("Press a button!");
if(con == true)
{
var left = ($(window).width()/2)-(640/2),
top = ($(window).height()/2)-(480/2),
popup = window.open ("http://twitter.com/intent/tweet", "popup", "width=640, height=480, top="+top+", left="+left);
}
});