160
rated 0 times
[
165]
[
5]
/ answers: 1 / hits: 17553
/ 10 Years ago, mon, july 21, 2014, 12:00:00
Small part of my html code :
<div class=text-center>
<div class=btn-group>
<button type=button class=btn btn-default dropdown-toggle data-toggle=dropdown>
Platforms <span class=caret></span>
</button>
<ul class=dropdown-menu role=menu id = buttonsPlace>
</ul>
</div>
In my js file :
for (i = 0; i < platformList.length; i++) {
var li = $(<li/> , { id : plat+i,class : dropdown text : platformList[i] } )
//var text = document.createTextNode(platformList[i]);
//li.appendChild(text);
//btn.data(platform, platformList[i] );
$(#buttonsPlace).append(li);
console.log(hiding);
$(#plat + i).hide();
}
However the menu is appearing but the menu items are not. where am i going wrong
More From » jquery