You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

117 lines
3.9 KiB

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div class="duibi_box" id="slideTxtBox">
<div class="parHd">
<div class="operate"><a href="javascript:hide_dis();" class="hide-me">隐藏</a></div>
</div>
<div class="parWarp">
<div class="parTit">对比栏</div>
<div class="parBd">
<div class="slideBox5" id="duibilan">
<div id="diff-items" class="diff-items clearfix">
<dl class="hasItem" id="compare_goods1">
<dt><h1>1</h1></dt>
<dd><span class="ts">您还可以继续添加</span></dd>
</dl>
<dl class="hasItem" id="compare_goods2">
<dt><h1>2</h1></dt>
<dd><span class="ts">您还可以继续添加</span></dd>
</dl>
<dl class="hasItem" id="compare_goods3">
<dt><h1>3</h1></dt>
<dd><span class="ts">您还可以继续添加</span></dd>
</dl>
<dl class="hasItem" id="compare_goods4">
<dt><h1>4</h1></dt>
<dd><span class="ts">您还可以继续添加</span></dd>
</dl>
</div>
<div class="diff-operate"><a id="compare_button" class="compare-active"></a><a id="qingkong" class="del-items">清空对比栏</a></div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(function(){
var winWidth = $(window).width();
var left = (winWidth-1200)/2;
$("#slideTxtBox").css({"left":left});
$(window).resize(function(){
winWidth = $(this).width();
if(winWidth>1200){
left = (winWidth-1200)/2;
$("#slideTxtBox").css({"left":left});
}else{
$("#slideTxtBox").css({"left":0});
}
});
});
document.getElementById('slideTxtBox').style.display = 'none';
function duibi_submit(obj,id)
{
if(id)
{
var goods_name = document.getElementById('history_name' + id).value;
var goods_img = document.getElementById('history_img' + id).value;
var market_price = document.getElementById('history_market' + id).value;
var shop_price = document.getElementById('history_shop' + id).value;
var goods_type = document.getElementById('history_type' + id).value;
Compare.add(obj, id, goods_name, goods_type, goods_img, market_price, shop_price, 0, 1, 0);
//document.getElementById('history_select' + id).value = 0;
//obj.className = 'btn-compare-s';
}
}
/*
function onchangeBtnClass(obj, id)
{
obj.className = 'btn-compare-s_red';
}
*/
function RemoveBtnClass(obj, id)
{
if(document.getElementById('history_select' + id).value == 1)
{
obj.className = 'btn-compare-s_red';
}
else
{
obj.className = 'btn-compare-s';
}
}
function hide_dis()
{
if(document.getElementById('slideTxtBox'))
{
document.getElementById('slideTxtBox').style.display = 'none';
}
}
function dis_duibilan()
{
document.getElementById('left_btn_duibi').style.display = 'none';
document.getElementById('right_btn_duibi').style.display = 'none';
document.getElementById('duibilan_text').className = 'on';
document.getElementById('cat_history_text').className = '';
document.getElementById('duibilan').style.display = 'block';
document.getElementById('cat_history').style.display = 'none';
}
function dis_history()
{
document.getElementById('left_btn_duibi').style.display = 'block';
document.getElementById('right_btn_duibi').style.display = 'block';
document.getElementById('duibilan_text').className = '';
document.getElementById('cat_history_text').className = 'on';
document.getElementById('duibilan').style.display = 'none';
document.getElementById('cat_history').style.display = 'block';
}
</script>