开发者

how to append dropdown list box

$("#Grid").click(
        $("#showgrid").load('SomeURL'));
        $.each($('#Grid td:nth-child(4n)'), function() {
         var forthColumn = $(this);
        forthColumn.append("<select><option value='1'>Division 1</option><option value='2'>Division 2&开发者_如何学Pythonlt;/option><option value='3'>Division 3</option></select>");
      });
    };

I am trying to append the dropdown list box? this way but I am not seeing the dropdownbox at 4th colum?

is this right? thanks for all..


try this way:

$("#Grid").bind("click", function(ev) {
  $("#showgrid").load('SomeURL'));
  $(this).find("td:nth-child(4)").each(function(i, el) {
    var forthColumn = $(this);
    forthColumn.append("<select><option value='1'>Division 1</option><option value='2'>Division 2</option><option value='3'>Division 3</option></select>");
  });
});
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜