If it's an id with a prefix (let's say the prefix is "blah") then you
could write:

    $('[id^=blah')

Be aware though that this will could be low as it will effectively
check the id of _every_ element on the page. If you can narrow down
the type of the element you're looking for, say to a DIV, then you
could write a much faster:

    $('div[id^=blah]')

Karl Rudd

On Thu, Mar 6, 2008 at 12:06 AM, Anjanesh <[EMAIL PROTECTED]> wrote:
>
>  Is there a way to reduce this
>
>  $("#id1, #id2, #id3, #id4, #id5, #id6, #id7, #id8, #id9,
>  #id10").click(function() { ... });
>
>  to something like this
>
>  $("#id[1-10]).click(function() { ... });
>
>  ?
>

Reply via email to