Javascript Element Properties From Object

December 19th, 2013

How to create a HTML tag, using an object of properties.

[code]$(‘#somediv’).append($(‘<a/>’, {href: ‘#’, id: ‘dothing’, text: ‘Do Thing’}));[/code]

WordPress - Entries (RSS) and Comments (RSS) - © 2011 Ben Dauphinee