jq的css()方法执行后如果执行回调函数

2025-06-21 11:56:13
推荐回答(1个)
回答1:

  你好,jq中css方法没有回调函数,代码如果用css()可以分开写,

  var d0 =$($("#Container").find(".dayItem")[0]);
  d0.css("height","0px");  d0.remove(); CalendarHandler.isRunning = false;

  还可以写成如下格式

  $(this).css({
      height: function(index, value) {
        return parseFloat(value) * 1.2;
      }
    });


具体使用方法可以参考http://www.css88.com/jqapi-1.9/css/

希望可以帮助到你