这个问题被问了很多次,但我有不同的细节。你能帮我附加一个动态创建的div吗?但不同的是我必须像下面这样创建 div。
这是jQuery
var new_div = "<div class='rounded_corner_with_border_and_tag' style='line-height:35px'><span class='span_tags'>Temel Bilgiler</span><br /><br /><div style='float:left;width:130px'>İsim:</div><div style='float:left;width:200px'><input id='Text1' class='blue_input' type='text' /></div><div style='clear:both'></div><div style='float:left;width:130px'>Soyad:</div><div style='float:left;width:200px'><input id='Text2' class='blue_input' type='text' /></div><div style='clear:both'></div><div style='float:left;width:130px'>Ünvan:</div><div style='float:left;width:200px'><input id='Text3' class='blue_input' type='text' /></div><div style='clear:both'></div><div style='float:left;width:130px'>Uzmanlık:</div><div style='float:left;width:200px'><input id='Text4' class='blue_input' type='text' /></div><div style='clear:both'></div><div style='float:left;width:130px'>Cep Numarası:</div><div style='float:left;width:200px'><input id='Text5' class='blue_input' type='text' /></div><div style='clear:both'></div><div style='line-height:6px'> </div><div style='float:right'><input type='button' id='Button2' name='btn_new_photo' value='Güncelle' class='theme05' /></div><div style='clear:both'></div></div>";
我无法创建静态 div,所以我必须在上面的 javascript 中创建它。
这是我的简单 jquery 代码....
$(document).ready(function () {
$('#menu_1').click(function () {
var new_div = "<div class='rounded_corner_with_border_and_tag' style='line-height:35px'><span class='span_tags'>Temel Bilgiler</span><br /><br /><div style='float:left;width:130px'>İsim:</div><div style='float:left;width:200px'><input id='Text1' class='blue_input' type='text' /></div><div style='clear:both'></div><div style='float:left;width:130px'>Soyad:</div><div style='float:left;width:200px'><input id='Text2' class='blue_input' type='text' /></div><div style='clear:both'></div><div style='float:left;width:130px'>Ünvan:</div><div style='float:left;width:200px'><input id='Text3' class='blue_input' type='text' /></div><div style='clear:both'></div><div style='float:left;width:130px'>Uzmanlık:</div><div style='float:left;width:200px'><input id='Text4' class='blue_input' type='text' /></div><div style='clear:both'></div><div style='float:left;width:130px'>Cep Numarası:</div><div style='float:left;width:200px'><input id='Text5' class='blue_input' type='text' /></div><div style='clear:both'></div><div style='line-height:6px'> </div><div style='float:right'><input type='button' id='Button2' name='btn_new_photo' value='Güncelle' class='theme05' /></div><div style='clear:both'></div></div>";
$('#div_profile_container').append(new_div).fadein();
});
});
我需要先让 div display:none 然后淡入但不能这样做。请帮忙...