I am trying to run a javascript which will return me the list (li) items count inside a div. I have tried with various script, but nothing works fine in IE 7.
HTML -
<ul class="ABC">
<li>1</li>
<li>2</li>
</ul>
Javascript - document.querySelectorAll('ul.ABC li').length
. This should return 2, but in IE 7 it does not work.
I know that query selector is not supported in IE7, i am looking for simple script which can do this. Does any one knows how i can achieve in IE 7 ?
Thanks!