I am trying to add multiple divs at run time using jQuery. I want to add 3 divs which are of same class and then append line break so when user clicks on “Add boxes” button again, i can display 3 more divs in the next line.
Here is the jsFiddle for the same: http://jsfiddle.net/WjFCf/3/
As you can see in the jsFiddle, it does almost everything but doesnt add line break after 3rd div. So when user clicks the button again, it just adds more divs in the same line.
Can someone please help me to get this right?
I think you want to
clearit.http://jsfiddle.net/WjFCf/4/
Notice the CSS change.