Worklight and jquery: I want fetch links present in the xml and want tag them with the row dynamically?

前端 未结 1 1891
时光取名叫无心
时光取名叫无心 2021-01-23 10:12

Above attached my image that fetched it remote server its shown as row in the contents page. I have link in the same xml, i want to tag that link to this row and clicking it us

相关标签:
1条回答
  • 2021-01-23 10:21

    You either need an anchor tag or you need to bind to the li's click event.

    var lineItems;
    
    lineItems = $(items).map(function(){
      var item = $(this);
      return '<li><a href="'+item.link+'">'+item.title+'</a></li>'
    }).get().join();
    
    ul.append(lineItems);
    
    0 讨论(0)
提交回复
热议问题