var dataset = [
{type:"success", text:"流石ですお兄様"},
{type:"danger", text:"moudameda..."}
];
d3.select("hogehoge")
.selectAll("div")
.data(dataset)
.enter()
.append("div")
.attr("class", function(d){ return "alert alert-" + d.type + " alert-dismissable"})
.text(function (d){return d.text})
.append("button")
.attr("type", "button")
.attr("class", "close")
.attr("data-dismiss", "alert")
.attr("aria-hidden", "true")
.text("\xD7")
More than 5 years have passed since last update.
D3.js + bootstrap で消去可能なアラートを表示
Last updated at Posted at 2014-09-19
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme
List of users who liked
55