【问题标题】:Use JQuery to loop through the li from the ColumnChooser's multiselect ul.selected tag?使用 JQuery 从 ColumnChooser 的多选 ul.selected 标记中循环遍历 li?
【发布时间】:2013-09-11 03:17:03
【问题描述】:

我在Add Remove Column Handler on jqGrid ColumnChooser 看到了这个链接。

不知如何使用这个JQuery语法循环遍历

  • 列表来获取显示文本...
        $("#colchooser_" + $.jgrid.jqID(this.id) + " ul.selected")
            //.bind("sortreceive", function (event, ui) {
            //    alert('column "' + ui.item.text() + '" is choosed');
            //});
    

    谢谢...

  • 【问题讨论】:

      标签: jqgrid


      【解决方案1】:

      .each()

      http://api.jquery.com/each/

      var id = $.jgrid.jqID(this.id);
      
      $("#colchooser_" + id + " ul.selected li").each(function() {
        console.log( $(this).text() );
      });
      

      这将注销每个<li> 的显示文本的内容。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2015-09-12
        • 1970-01-01
        • 2016-09-20
        • 2012-04-12
        • 1970-01-01
        相关资源
        最近更新 更多