I am trying to add a class to an existing div container and insert a new div (if successful) below the existing one.
<script> $(document).ready(function(){ $(".entry").click(function(){ $('#content').addClass("col2",1000).after('<div class="box col2">test</div>', function(){ $(this).slideDown(); }); }); }); <script>
Unfortunately, this code does not work correctly. The slideDown function does not work, and a new div already appears, even if the previous function has not yet been completed.
It would be great if someone could help me.
source share