Object Oriented After Page Load
I'm trying to write object oriented so :
$(function(){
Obj.IntervalTime();
});
var Obj = {
Features : {
Length : $("#NAV").children().length
},
IntervalTime : function(){
alert(Obj.Features.Length);
},
};
<ul id = "NAV">
<li>
1
</li>
<li>
2
</li>
<li>
3
</li>
</ul>
code should alert 3 but alert 0
Why?
Thanks All