add(selector,?[context])??????self添加元素到當前匹配的元素集合中。如果給定content參數,將只在content元素中進行查找,否則在整個document中查找。<ul>
??????<li>list?item?1</li>
??????<li>list?item?2</li>
??????<li>list?item?3</li>
??</ul>
??<p>a?paragraph</p>
??<script?type="text/javascript">
??????$('li').add('p').css('background-color',?'red');
??</script>上面是手冊上面的例子和方法?這個怎么理解啊,難道不是吧p標簽添加到li里面嗎,可是我測試后發現,p標簽并沒有添加到li里面去!
zepto.js 的add方法無法理解!
我家在玉堆
2017-01-09 14:41:01