質問する
82 次
2 に答える
1
さて、ここであなたができることです
var class= $("li").attr('class'); // you can use your own Selector instead of $("li")
于 2013-05-07T12:49:09.450 に答える
0
試す
var ChooseAltType = $("<div>").appendTo(field_firstchild);
$('<div id="chooseCustomFields'
+ field_id
+ '" class="wrapper-customfields" tabindex="1"><span>Choose Type</span>'
+ '<ul id="chooseCustomField'
+ field_id
+ '" class="dropdown">'
+ '<li class="chooseCheckbox"><i class="fa-icon-check"></i>Checkbox</li>'
+ '<li class="chooseAlternatives"><i class="fa-icon-list-ul"></i> Alternatives</li>'
+ '<li class="chooseDropdown"><i class="fa-icon-list-alt"></i> Dropdown</li>'
+ '<li class="chooseTextField"><i class="fa-icon-font"></i> Text</li>'
+ '</ul></div>').appendTo(field_secondchild).addClass("metro three-d")
.click(function() {
$('#chooseCustomField' + field_id + ' li').each(function() {
console.log($(this).attr('classs'))
});
});
于 2013-05-07T12:52:41.927 に答える