i think itll be covered in this. http://stackoverflow.com/questions/224820/how-do-you-pass-arguments-to-anonymous-functions-in-javascript
> Date: Thu, 16 Apr 2009 14:46:41 -0700 > Subject: [jQuery] passing more than 1 param via click()? > From: kgos...@gmail.com > To: jquery-en@googlegroups.com > > > Hey all, > > Not really sure how to ask this, so I'm sorry if my title is mis- > leading. It is also why I wasn't able to find much searching, so I'm > sorry if it's answered already. > > Basically, the code I inherited was this: > > <a > href="#drop" > class="edit-link" > onclick=" > removeDept('<c:out value="${key}" />','<c:out value="$ > {name}" />'); > return false;" > >Remove Department</a> > > And that is in an iteration, so the two values passed to the > "removeDept" function are always dynamic. > > I'm trying to handle this in the document.ready(). Normally, I throw > the would-be dynamic param passed as a rel tag on an anchor, and > that's how I retrieve things when I clean up code like this. > > However, I'm scratching my head for the *best* way to handle this with > the two params now... How do you guys recommend I handle something > like that? > > $(document).ready(function() { > $(".edit-link").click(function(){ > removeDept($(this).attr("rel"),$(this).attr("rel")); > return false; > }); > }); > > > > Obviously I can't have two rel attributes :) > > > Thanks in advance. _________________________________________________________________ View your Twitter and Flickr updates from one place – Learn more! http://clk.atdmt.com/UKM/go/137984870/direct/01/