I've got this type of link in my HTML :
Librairy :
<script type="text/javascript" src="../../resources/js/jquery/jquery-1.12.3.min.js"></script>
HTML :
<a id='1' href='#' class='bulletinLink'> Bulletin du 11-01-2015 </a>
<a id='2' href='#' class='bulletinLink'> Bulletin du 13-02-2015 </a>
...
I want to get the id of this link when I click, this is my jQuery:
$(function() {
$('.bulletinLink').on('click',function(event){
var id = $(this).attr('id');
alert(id);
})
});
When I click in the link, it doesn't fire the jQuery function, what am I missing?