On Wed, Jan 20, 2010 at 2:54 AM, West415 <malik.robin...@gmail.com> wrote:
> My question is how can I use jquery to assign click handlers without having
> to do this:
>
> <cfloop from="1" to="5" index="i">
> <button id="create-user_#i#" click="createUser(#user_id#)>Create
> User</button>
> <button id="create-user_#i#" click="createUser(#user_id#)>Create
> User</button>
> </cfloop>

Should be able to make something like this work:

$("button.createUserLink").click(function() {
  createUser(this.id);
});

Nathan

Reply via email to