make links open in new window

This commit is contained in:
Sanj 2011-06-26 01:37:37 +05:30
parent f111f59812
commit f7ede187da

View File

@ -34,12 +34,23 @@ $(function() {
});
$texts.push($this);
var highlightShadow = '2px 2px 1px #666';
var highlightCSS = {
'fontWeight': 'bold',
'backgroundColor': '#ffff00'
}
var unhighlightCSS = {
'fontWeight': 'normal',
'backgroundColor': '#ffffff'
}
$this.mouseover(function(e) {
var typ = $(this).data("type");
for (var i=0; i<$texts.length;i++) {
var $t = $texts[i];
if ($t.data("type") == typ) {
$t.css({'fontWeight': 'bold'});
$t.css(highlightCSS);
}
}
// $('.' + cls).addClass("highlighted");
@ -51,14 +62,15 @@ $(function() {
for (var i=0; i<$texts.length;i++) {
var $t = $texts[i];
if ($t.data("type") == typ) {
$t.css({'fontWeight': 'normal'});
$t.css(unhighlightCSS);
}
}
// $('.' + cls).removeClass("highlighted");
});
$this.click(function() {
console.log($(this).data("link"));
window.open($(this).data("link"));
// console.log($(this).data("link"));
});
}
});