console.log(jj.height())  这个是0
只有在火狐下是正常的..ie跟谷歌是0,
但是如果换成append就正常了...
为什么会这样啊?
.hh{
    width:100px;
height: 100px;
    background:red
}
<div style="width:500px;margin:10px auto"></div>
var jj; function cc(){
aa()
bb()
}
cc() function aa(){
var el = $("<div class='hh' />").css({
"position" : "absolute",
"top" : "0px",
"left" : "0px"
});

$("div").wrapInner(el);
jj = el;
} function bb(){
console.log(jj)
console.log(jj.height())
}
jqueryjavascript