Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// 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');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.