Reputation: 41
how to create an unordered list using jquery which should contain images as items and behind the images link should be given to a specific function
i.e onClick on the list item it should call certain function
Upvotes: 0
Views: 924
Reputation: 9671
If you must add using jquery:
$('body').append('<ul id="test" />');
$('#test').append('<li>'+data+'</li>')
$('ul li').click(function(){
//onclick event
})
Upvotes: 1