Can't figure this out

Discussion in 'jQuery' started by qwikad.com, Apr 6, 2016.

  1. #1
    Solved! View solution.
    qwikad.com, Apr 6, 2016 IP
  2. #2
    Hey there! You need to change this line:
    if ($('.accordion_body').is(':visible')) {
    to
    if ($(this).find('.accordion_body').is(':visible')) {

    With the old code you're closing every accordion div every time you open a new one. With the new code you only close the div the user clicked on.
    Good luck!
     
    fisasti, Apr 11, 2016 IP
    qwikad.com likes this.