ludofleury
2/15/2011 - 8:36 PM

gistfile1.js

// Ouvre le premier lien enfant de l'élément cible 
// Reproduit le comportement des navigateurs (ctrl ou cmd ou middleclick = nouvel onglet)
$('.line-click').live('click', function(e){
  e.stopPropagation();
  href = $(this).children('a:first').attr('href');
  if (e.ctrlKey || e.metaKey || e.which == 2) {
    window.open(href);
  } else {
    window.location = href;
  }
}).css('cursor', 'pointer');test