Create A button with function in Jquery

#Create A button with function in Jquery var fav_del = ‘<i class=”fa fa-trash-o” aria-hidden=”true”></i>’; var fav_del = ‘<i class=”fa fa-trash-o” aria-hidden=”true”></i>’; var delete_btn = $(“<button/>”).attr({ “class” : “btn btn-danger btn-sm”, }).html(fav_del); delete_btn.on(“click”, function() { $(“#” + element_id).remove();});