Ads 468x60px

Friday, January 8, 2016

How to create a element in jquery ?


Hi it's very simple download to jquery plugin and write some code Define a variable assign to value as like this
Jquery Code here
$(document).ready(function(){
// Create a HTML Tag Code here start
var newDiv = document.createElement('div');
$(newDiv).addClass('wraper');
$(newDiv).attr('data-role','wraperDivAttribute');
$(newDiv).html('This is wraper section');

$(newDiv).appendTo($("body")) ;// wraper div append to body
// Create a HTML Tag Code here end
});




0 comments:

Post a Comment