javascript - Give href value to a div -
i'm using bootstrap accordion , has code:
<div class="panel-heading" data-toggle="collapse" data-parent="#accordion" href="#collapseone">
i want create accordion dynamically, can't set .href value div in javascript.
var accordionhead = document.createelement("div"); accordionhead.classname = "panel-heading"; accordionhead.dataset.parent = "#accordion"; accordionhead.dataset.toggle = "collapse"; accordionhead.href = "#id_"+player.pos;
every other option valued, not .href , accordion not working. there other option give .href value div?
var accordionhead = document.createelement("div"); accordionhead.classname = "panel-heading"; accordionhead.dataset.parent = "#accordion"; accordionhead.dataset.toggle = "collapse"; accordionhead.setattribute("href","#id_"+player.pos);`
Comments
Post a Comment