array in jquery

a jquery function, it works when i call single items like $('list1').fadeIn("100000");.
 but it fails when i use the array. whats the correct syntax to replace single item with array?
function fadee(){
        for(i=0;i<list.length;i++){
                document.getElementById(list[i]).style.display='none';
        }
        $('list[i]').fadeIn("100000"); 
		/*$('list1').fadeIn("100000"); */
		document.getElementById(list[i]).style.display='';
 }

Open in new window

vidhubalaAsked:
Who is Participating?
 
hieloConnect With a Mentor Commented:
try:
$('#' + list[i]).fadeIn("100000");
0
 
hieloCommented:
NOTE: that statement is outside the for clause, so "i" refers to a non-existent element. perhaps you meant to have it within the for.
0
 
vidhubalaAuthor Commented:
great. thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.