[jQuery] Re: how to call 1 function from many buttons by passing parameters

2009-04-15 Thread HISSAM
thanks dude!! On Apr 15, 10:35 am, "Mohd.Tareq" wrote: > Hi Hissam, > If you have 5 div : > > $(function(){ > > $('.common').click(function(e){ > > $('.common').hide(); > > var targetId = e.target.id; > $('#'+targetId).show(); > > }); > }); > > > > > > > > try with this . > > cheers. > > On

[jQuery] Re: how to call 1 function from many buttons by passing parameters

2009-04-14 Thread Mohd.Tareq
Hi Hissam, If you have 5 div : $(function(){ $('.common').click(function(e){ $('.common').hide(); var targetId = e.target.id; $('#'+targetId).show(); }); }); try with this . cheers. On Mon, Apr 13, 2009 at 6:50 PM, Eric Garside wrote: > > Take a look at the jQuery UI Accordion p

[jQuery] Re: how to call 1 function from many buttons by passing parameters

2009-04-13 Thread Eric Garside
Take a look at the jQuery UI Accordion plugin. http://ui.jquery.com On Apr 13, 6:30 am, HISSAM wrote: > Hey I'm new to JQuery > > I have 5 divs > At a time only 1 div should be expanded the others must be hidden > > I'm using the show and hide function > But I want to function parameterised to