从回调列表中删除一个回调或一组回调
xiyuetaCSS().remove()属性方法,一种调用方式:
1、xiyuetaCSS("div").remove(); //从回调列表中删除一个回调或一组回调,移除成功length>0,移除失败length=0
总结:xiyuetaCSS().remove()用法与jQuery中jQuery().remove()用法保持一致。xiyuetaCSS("div").remove();移除同 xiyuetaCSS().html(" ","all"); 替换 有所不同,.html(" ")设置内容块不能为空,xiyuetaCSS().remove()有返回值length
see https://api.jquery.com/remove
尝试一下>>
<script src="https://www.xiyueta.com/js/xiyueta.min.js"></script> <script>
var css="div{font-size:12px;}li{font-size:12px;}"; xiyuetaCSS().parse(css); $.log(xiyuetaCSS("div").remove().print());
</script>
li{font-size:12px;}