goods.js 871 Bytes
define(function( require, exports, module ) {
    var _cds = $(".conditions-list");
    var _cds_height = _cds.height();
    var limit = 64;
    
    if (_cds_height <= 64){
      limit = _cds_height;
      $(".conditions .list-more").hide();

      return;
    }

    _cds.animate({height: limit},200);
    $(".list-more .label").text('更多');
    $(".list-more i").removeClass('icon-up').addClass('icon-down');

    $(".conditions .list-more").toggle(function(){
        $(".conditions-list").stop(false,true).animate({height: _cds_height},200);
        $("i",this).removeClass('icon-down').addClass('icon-up');
        $(".label",this).text('收起');
    },function(){
        $(".conditions-list").stop(false,true).animate({height: limit},200);
        $("i",this).removeClass('icon-up').addClass('icon-down');
        $(".label",this).text('更多');
    });
});