the button dynamically generated by JQuery disappears a little bit. Does any boss know why?
<div class="col-sm-4">
<button type="button" class="btn btn-md btn-link" id="data_con_Add"></button>
</div>
$(document).on("click", "-sharpdata_con_Add", function () {
$("-sharpdata_con_Add").addClass("disabled");
var helpDiv = $("<div></div>").addClass("input-group");
var helpinput = $("<input type="text" id="searchInfo">").addClass("form-control1 input-search");
var helpspan = $("<span></span>").addClass("input-group-btn")
.append($("<button></button>").addClass("btn btn-success search_btn").append($("<i></i>").addClass("fa fa-search")));
helpDiv.append(helpinput).append(helpspan).appendTo("-sharpnew-problem");
var helpDiv2 = $("<div></div>").addClass("col-md-6 form-group filled");
var helpLabel = $("<label></label>").addClass("control-label").append("Select");
var helpSelect = $("<select name="cont"></select>").addClass("form-control1 ng-invalid ng-invalid-required");
helpDiv2.append(helpLabel).append(helpSelect).appendTo("-sharpnew-problem");
});
then the interface goes like this
:
then click the red button and the whole page will refresh. Why? Change it to a tag and click on it. I didn"t bind the event for this button. Do any bosses know why? For advice, thank you.