我已经在网上搜索,也许我是问或以错误的方式搜索,但我似乎无法找到解决方案。.html不采取样式表类
当我要么做.html()或.append()我似乎没有得到样式表样式到新的HTML?
下面是我在做什么:
$.post("updatepassword.php", {
new_pass: true,
password1: $(form).find('#password1').val(),
password2: $(form).find('#password2').val() }).done(function(data) {
if(data == "success"){
show_loading_bar({
delay: .5,
pct: 100,
finish: function(){
$(".modal-header").append('<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>');
$(".modal-body").html("Yes...");
$(".modal-footer").html('<button type="button" class="btn btn-white" data-dismiss="modal">Luk</button>');
}
});
} else {
toastr.error("Error!", opts);
$(form).find('#password1').select();
}
});
所有类是完全没有考虑到新的HTML?!?这是一个错误还是我在这里错过了什么?
希望能帮助和在此先感谢:-)
你没有*样式风格*示例所示。你的意思是你的课程没有添加? – 2015-02-09 09:51:41
是的,类不添加。样式表已经加载到我的页面中。 – Mansa 2015-02-09 09:52:38
这几行很好的自行工作:http://jsfiddle.net/TrueBlueAussie/bd5fkh3j/看起来像'finish:'事件没有被调用。 – 2015-02-09 09:53:23