Yes,you can do this.
$("[id*=wrap_]").click(
  function()
 {
    var id=$(this).attr("id");
    var targetId="elem_"+getNum(id);
    $("#"+targetId).toggle();
 }
);

2009/9/17 macsig <sigbac...@gmail.com>

>
> Hello guys,
> is there a way to select elements that match a regular expression?
>
> I have a set of divs with id = "wrap_n" where n is a progressive and I
> need to select them and for each 1 I have to add a function that
> togggle the "elem_n" div.
>
> Thanks
>
>
> Sig

Reply via email to