Is there conditional looping with $.each function in jQuery

前端 未结 3 1890
隐瞒了意图╮
隐瞒了意图╮ 2021-01-29 13:36

I have a query about jQuery\'s $.each method. Below is my ajax which is working quite well:

$.ajax({
    url:\'js/people-json.js\',
    type:\'post\         


        
3条回答
  •  一生所求
    2021-01-29 14:04

    it can be like this on the basis of the tag.. or list of the data, can you please try and tell whether it is helpful..

    $('li').each(function(index) {
        alert(index + ': ' + $(this).text());
    });
    

    please apply some logic like this and test..

提交回复
热议问题