I have a load of buttons with almost similar names but with a number
identifying them:
id=editimage1
id=editimage2
id=editimage3
id=editimage4
etc.

In the onclick event of these buttons I want to do something:
    $("#editimage1").click(function() {
                loadPopup('Image1');
        });

Now I can place this function in my js files as many times as the
button occurs, but that seem rather inefficient.
I'd rather have a single function which I can reuse for all buttons,
something like this pseudocode:

    $("#editimage{imgId}").click(function() {
                loadPopup('Image{imgId}');
        });

Is that possible?

Thanks!
-- 
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to jquery...@googlegroups.com.
To unsubscribe from this group, send email to 
jquery-ui+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en.


Reply via email to