<button aria-hidden="true">Close</button>
I have a button tag in html. I want to add <data-dismiss="modal">
inside button tag by JQuery so that it become like <button data-dismiss="modal" aria-hidden="true">Close</button>
. Is there any way to do it?
$('button').attr("data-dismiss","modal");
.attr
takes 2 parameters, attribute and the value.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments