-
-
Save ludofleury/828193 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment