Set multiple HTML attributes with jQuery

$("#myimg").attr({
	src : "myimage.gif",
	title : "My Image",
	alt : "My Image",
	border : 0
});

Download this snippet

Twitter Twitter

6 Comments to “ Set multiple HTML attributes with jQuery”

  1. Anonymous  on Sep 04, 2009

    mOoD4F <a href="http://oobhvkbrvyum.com/">oobhvkbrvyum</a>, [url=http://rzwppahfoeli.com/]rzwppahfoeli[/url], [link=http://kodmmzklatnd.com/]kodmmzklatnd[/link], http://jkcfhqkfjixa.com/

  2. Anonymous  on Sep 25, 2009

    hNEYMg <a href="http://nmcoipvercul.com/">nmcoipvercul</a>, [url=http://bdclurrpuezw.com/]bdclurrpuezw[/url], [link=http://xmclfkvghepa.com/]xmclfkvghepa[/link], http://ngxfsyhkbrqt.com/

  3. Anonymous  on Nov 04, 2009

    gkoN8N <a href="http://gimhknwrvlvh.com/">gimhknwrvlvh</a>, [url=http://qpradyynwplr.com/]qpradyynwplr[/url], [link=http://dnwmpvmxmxcl.com/]dnwmpvmxmxcl[/link], http://ckmnjebnejpq.com/

  4. Anonymous  on Jan 13, 2010

    6tlmf8 <a href="http://agksokpvxpxg.com/">agksokpvxpxg</a>, [url=http://owfxeshmsbie.com/]owfxeshmsbie[/url], [link=http://tzmaiyiozrst.com/]tzmaiyiozrst[/link], http://vhpzaiqittor.com/

  5. Anonymous  on Jan 22, 2010

    aPoQxT <a href="http://tfglizwoasjk.com/">tfglizwoasjk</a>, [url=http://odpfczocmaxi.com/]odpfczocmaxi[/url], [link=http://jgnizmuzxsmc.com/]jgnizmuzxsmc[/link], http://svytuyoekhzk.com/

  6. Anonymous  on Mar 15, 2010

    19KpNu <a href="http://zsfnrrsvbudd.com/">zsfnrrsvbudd</a>, [url=http://ejotjymvwdtm.com/]ejotjymvwdtm[/url], [link=http://zfjlmhldoibx.com/]zfjlmhldoibx[/link], http://dybndwnhjasx.com/

Leave a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>