- 2
jquery problem..need ur help
$(function(){ $("#x li:eq(1)").click(function(){ $("#y li:eq(0)").slideToggle(); $("#y li:eq(1)").slideToggle(); $("#y li:eq(2)").slideToggle(); )}; )}; how do i put the 3 function parameters in a single line of code? i tried this, $("#y li:eq(0)(1)(2)").slideToggle();...it ddn't work
8 Answers
+ 5
I'm not using JQuery, and I don't know what's your html, but do you have simply try:
$('#y li').slideToggle();
?
+ 5
Else, this would do the trick:
$('#y li:nth-child(-n+3)').slideToggle();
edit : 3 not 5 :P
+ 4
Provide the related html code... even the complete page code playground link for increase your chance to receive help ^^
0
@Yaroslav...those codes above work just fine...all i want to know is to combine the function event to shorten the codes, if u ddn't know...
0
I don't even know what is it, how can I help you with something undefined?
is that something like accordion menu?
0
@Yaroslav....av u ever used jquery?....
0
thanks visph...i'll try that....
- 3
cancer of my eyes