It’s impossible to implement such a task: by clicking on $("div.block")
new <div></div>
element should appear immediately after it; on the second press, the same item is deleted.
Before
... <header></header> <div id="content"> <div class="logoblock"></div> <div class="block"></div> <div class="block"></div> </div> <footer></footer> ...
After
... <header></header> <div id="content"> <div class="logoblock"></div> <div class="block"></div> // кликаем <div></div> // добавляем <div class="block"></div> </div> <footer></footer> ...
I understand, of course, that toggle(click1,click2);
works here toggle(click1,click2);
but can't figure out how to add an item; or rather, I cannot figure out how to get to the element from which it can be added.