Adding Fields(block) Using jQuery clone()
jQuery clone() creates a copy of matched element. It comes in handy since it does not only creates a copy of matched elements but also, all of their descendant elements and text nodes.
Using clone(), we can create "Add more" without using any external js files or plugins
FULL CODE
HTML
JQUERY
ResultHelloWorld
The above code creates a clone of div with class as world and appends it to div with class hello.Hello
WorldWorld
Using clone(), we can create "Add more" without using any external js files or plugins
FULL CODE
HTML
CSSAdd More +Price
.close{ cursor:pointer; }
JQUERY
Try It In FIDDLE Yourself
Comments
Post a Comment