Jquery lien dans un nouvel onglet
Bonjour,
je souhaite que mes liens "Href.." s'ouvrent toujours dans un nouvel onglet
Voici le code qui ne fonctionne pas :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title><?php echo $nom_site ?></title>
<link rel="stylesheet" type="text/css" href="<?php echo $nom_style ?>" />
<script type="text/javascript" src="jquery.js"></script>
<!-- <script type="text/javascript" src="jquery-1.2.1.pack.js"></script> -->
<script type="text/javascript">
// pour les liens externes on fait un nouvel onglet !
jQuery('a.newTab').live('click', function(){
newwindow=window.open($(this).);
jQuery(this).target = "_blank";
return false;
});
</script>
</head>
<body> |
Merci !