i have following html
<div id="mydiv"> <div class="myclass">test1</div> <div class="myclass">test2</div> <div class="myclass">test3</div> <div class="myclass">test4</div> </div>
i'm trying use jquery eq function , far have this:
function(theindex) { alert( ('.myclass').eq(theindex).html() ); };
i'm getting error in chrome
uncaught typeerror: object .myclass has no method 'eq'
what doing wrong?
thanks suggestions.
function(theindex) { alert( $('.myclass').eq(theindex).html() ); };
remember index going 0 based, too...
Comments
Post a Comment