I want to pass
in onclick
event. here is my exiting code.
I prefer to use the HTML5 data API, check this documentation:
$('#some-list li').click(function() {
var textLoaded = 'Loading element with id='
+ $(this).data('id');
$('#loading-content').text(textLoaded);
});
- One
- Two
- Other