Link to home
Start Free TrialLog in
Avatar of vidhubala
vidhubala

asked on

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

ASKER CERTIFIED SOLUTION
Avatar of hielo
hielo
Flag of Wallis and Futuna image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
Avatar of vidhubala
vidhubala

ASKER

great. thanks