Nizam Techs

Nizam Techs

3 Articles Published

Articles by Nizam Techs

3 articles

How to create a div element in jQuery?

Nizam Techs
Nizam Techs
Updated on 12-Jun-2020 1K+ Views

They are many way to add a div using jquery , but as the requirement says  on click of any square we have to addd a div.  The following code below will help in adding a div on click Click on any square below to see the result                               $(".div").on("click",function(){ $('#box').append(   $('')     .attr("id", "newDiv1")     .addClass("div")     .append("")       .text("hello world")     ); });

Read More
Showing 1–3 of 3 articles
« Prev 1 Next »
Advertisements