jquery - How to add data-dismiss inside button tag? -
<button aria-hidden="true">close</button>
i have button tag in html. want add <data-dismiss="modal">
inside button tag jquery become <button data-dismiss="modal" aria-hidden="true">close</button>
. there way it?
$('button').attr("data-dismiss","modal");
.attr
takes 2 parameters, attribute , value.
Comments
Post a Comment