> How can I make jQuery read say this code:
>
> <div rel="tab-1"></div>
> <div rel="tab-2"></div>
>
> and replace the 'rel' with 'id' ? Or is this asking too much?

How about this?

$("div[rel]").each(function(){
   $(this).attr("id", $(this).attr("rel"));
});

Reply via email to