HTML代码
<div id="main" style="width:1000px; height:2000px; background:#eee; margin:0 auto;">
<div id="tag_cmt" style="width:1000px;height:1000px; background:#669900;">aaa</div>
<div id="tag_about" style="width:1000px;height:1000px; background:#F90; margin:0 auto;">bbb</div>
</div>
<div id="tbox">
<ul>
<li><a href="#tag_cmt">aaa</a></li>
<li><a href="#tag_about">bbb</a></li>
<li id="idea" onclick="javascript:window.open('#','_blank')"></li>
<li id="online_service" onclick="javascript:window.open('#','_blank')"></li>
</ul>
<dl>
<dd>xxx</dd>
<dd id="gotop"><a href="javascript:void(0)"></a></dd>
</dl>
</div>
JS代码
$("#tbox ul li").hover(function() {
$(this).css("background-color","#e2e2e2");
},function(){
$(this).css("background-color","#ffffff");
});
------解决方案--------------------
没看懂啊~~
------解决方案--------------------
你的标题和描述也太乱了点
<div id="main" style="width:1000px; height:2000px; background:#eee; margin:0 auto;">
<div id="tag_cmt" style="width:1000px;height:1000px; background:#669900;">aaa</div>
<div id="tag_about" style="width:1000px;height:1000px; background:#F90; margin:0 auto;">bbb</div>
</div>
<div id="tbox">
<ul>
</ul>
<dl>
<dd>xxx</dd>
<dd id="gotop"><a href="javascript:void(0)"></a></dd>
</dl>
</div>
js:
$('#main').children().each(function(i,item){
$("#tbox").find('ul').append($('<li>').html($(item).html()));
});
$("#tbox ul li").hover(function() {
$(this).css("background-color","#e2e2e2");
},function(){
$(this).css("background-color","#ffffff");
});
------解决方案--------------------
<div id="main" style="width:1000px; height:2000px; background:#eee; margin:0 auto;">
<div id="tag_cmt" style="width:1000px;height:1000px; background:#669900;">aaa</div>
<div id="tag_about" style="width:1000px;height:1000px; background:#F90; margin:0 auto;">bbb</div>
</div>
<div id="tbox" style="position:fixed;bottom:0px;right:0px">
<ul>
<li><a href="#tag_cmt">aaa</a></li>
<li><a href="#tag_about">bbb</a></li>
<li id="idea" onclick="javascript:window.open('#','_blank')"></li>
<li id="online_service" onclick="javascript:window.open('#','_blank')"></li>