Slidetoggle with a close button - jQuery
问题 I'm using the slidetoggle function to open & close a box when clicking on a link. I want to be able to add a "close" button (link) inside that box aswell as being able to close it via the slidetoggle trigger. How would i do this? This is my jQuery: $(".popup-b").hide(); $(".popup-l").click(function(){ $(this).toggleClass("active").next().slideToggle(0); return false; }); My HTML <a class="popup-l" href="#">Areas</a> <div id="area-p" class="popup-box"> <div class="close-this"><a href="#">Close