Tag Making Javascript Utility Function

Want to make tags dynamically with Javascript?
https://github.com/jasonmhead/makeTag

makeTag
=======
Tag making Javascript function

Usage:
makeTag(tag,tContent,tID,tClass,tValue,tAlt,tOther);

// JQuery dom insert
var tag1 = makeTag(‘button’,’Test’,’testBtn’,’TestBtnClass’,”,’Test Alt’,’title=”Test Title”‘);
var tag2 = makeTag(‘input’,”,’testInput’,’testInputClass’,”,”,’title=”test title”‘);

$(document).ready(function() {
$(‘#node-9-tagArea’).append(tag1);
$(‘#node-9-tagArea’).append(tag2);
});

The result:

Tag Making Javascript Utility Function

Leave a Reply

Your email address will not be published. Required fields are marked *

Confirm you are human * Time limit is exhausted. Please reload the CAPTCHA.