collapse and expand tabs jquery / simple accordion
I have two different methods for simple accordion; 1st with close button, 2nd is with hover trigger. 1) Here is JsFiddle example with close button: jQuery: $(‘.content’).slideUp(400);//reset panels $(‘.panel’).click(function() {//open var takeID = $(this).attr(‘id’);//takes id from clicked ele $(‘#’+takeID+’C’).slideDown(400); //show’s clicked ele’s id macthed div = 1second }); $(‘span’).click(function() {//close var takeID = $(this).attr(‘id’).replace(‘Close’,”); //strip … Read more