//隐藏其他币种对
$('.thisb_hide').click(function(){
if(sessionStorage.getItem('hidewallet')){
sessionStorage.removeItem('hidewallet');
}else{
sessionStorage.setItem('hidewallet',true);
}
hidewallet($("#lscj"),$('.thisb_hide').find('span').eq(0),sessionStorage.getItem('hidewallet'));
});
function hidewallet(that,_that,session){
if(session){
_that.css('background','#FFE100');
_that.next().text('显示全部');
var len = that.find('li').length;
for(var i=0;i<len;i++){
var num = that.find('li').eq(i).find("div").eq(0).text();
console.log(num);
if(num !== $('#currencyIdentity').val()){
that.find('li').eq(i).addClass("hidden");
}
}
}else{
_that.css('background','#eee');
_that.next().text('隐藏其他币种对');
that.find('.hidden').removeClass("hidden");
}
}
网友评论