Skip to content

Instantly share code, notes, and snippets.

@hanhan1978
Last active May 21, 2017 21:37
Show Gist options
  • Save hanhan1978/9a27f6b4682793f1b517197a2c589c03 to your computer and use it in GitHub Desktop.
Save hanhan1978/9a27f6b4682793f1b517197a2c589c03 to your computer and use it in GitHub Desktop.
<div class="links">
<a onclick="doSomething({{ $number }});" href="#">Do something</a>
</div>
<script>
function doSomething(number){
console.log(number);
}
$('.links > a').on({
mouseenter: function () {
$(this).css('color', 'red');
},
mouseout: function() {
$(this).css('color', '');
}
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment