将节点储存在变量上却无法使用函数
/****** html代码 *******/
<div id="box">
<p>ddddddd00000kkdkkkkkkkkkkk</p>
<p>dddddddddddddkkdkkkkkkkkkkk</p>
<p>dddddd啊发发kdkkkkkkkkkkk</p>
<p>dddddddddddddkkdkkkkkkkkkkk</p>
<p>ddddd打分dkkkkkkkkkkk</p>
<p>ddddd5668844dkkkkkkkkkkk</p>
<p>ddddd嗯嗯kdkkkkkkkkkkk</p>
<p>dddddddddddddkkdkkkkkkkkkkk</p>
<p>ddddddddkkdkkkkkk聊了几句kkkkk</p>
<p>dddddddddddddkkdkkkkkkkkkkk</p>
<p>dddddddddddddkkdkkkkkkkkkkk</p>
</div>
/******** js代码 ********/
var L = {
Node: new Array()
}
L.Node = $("#box").children();
L.Node[3].css('color','rgba(102,153,153,1)');
/******** firebug显示的错误 ********/
TypeError: L.Node[3].css is not a function
L.Node[3].css('color','rgba(102,153,153,1)');
弄了好久都没搞明白为啥出错了,有木有大神一眼看出哪里错了
------解决方案--------------------放到 $(function(){ }) 里试试,可能文档没解析完你就执行了