It's not plugin but jQuery core function attr duing this.
attr: function(o,a,v){
...
if ( v != undefined ) {
o[a] = v; // o.className = "myClassName" :: <tag
class="myClass" />
if ( o.setAttribute && a != "disabled" )
o.setAttribute(a,v); //
o.setAttribute('className', "myClass") ::
<tag className="myClass" />
}
...
},
On 8/17/06, Madison Bryan <[EMAIL PROTECTED]> wrote:
>
> I'm using Another Easy DOM creation extension...
>
> http://mg.to/2006/02/27/easy-dom-creation-for-jquery-and-
> prototype#comment-176
>
> to dynamically create a section from a JSON request...
>
> $.tpl(pArray, function(){
> return [
> 'address',{'class':"vcard"},[
> 'span',{'class':"fn"}, [this.FIRST_NAME+'
> '+this.LAST_NAME],
> 'span',{'class':"org"}, [this.SEARCH],
>
> 'a',{'href':"mailto:"+this.EMAIL,'class':"email"}, [this.EMAIL],
> 'span',{'class':"tel"}, [this.PHONE_NUMBER],
> 'span',{'class':"url"},
> ['a',{'href':this.URL}, [this.URL]]
> ]];
> }).appendTo('#section-'+sec);
>
> For some reason, it's adding an extra attribute called classname...
>
> <address class="vcard" class="vcard">...
>
> ...to all the elements. I can't seem to figure out why it's doing this.
>
> Does anybody have an idea?
>
> Thanks,
> Madison
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/