Full編輯:如何換一個div與另一個div - jQuery Wrap
如何包裝一個jquery div與另一個div?
樣品: 有
this.vpath = $('<div/>', {
'class': 'rollbar-path-vertical'
});
一個jQuery腳本里面......
現在我試圖用這樣的:
$('.rollbar-path-vertical').wrapAll('<div class="path-fix" />');
爲了讓這個.rollbar - 路徑 - 垂直裏面的另一個名爲.path-fix的div ...我做錯了什麼?我瘋了......謝謝你的神經和時間。
CSS:
.path-fix {
position: absolute;
width: 15px;
}
.rollbar-path-vertical {
right: 5px;
top: 0px;
height: 100%;
width: 15px;
position: fixed;
margin: 8px -5px;
border-radius: 0px;
}
你能否提供CSS? –
當然...更新:) – dvLden