开发者

how to create list using jquery

开发者 https://www.devze.com 2023-02-19 13:22 出处:网络
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

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 ce开发者_StackOverflowrtain function


If you must add using jquery:

$('body').append('<ul id="test" />');
$('#test').append('<li>'+data+'</li>')

$('ul li').click(function(){
    //onclick event
})
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号