{"version":3,"file":"clickHandlers-B6nYJmvS.js","sources":["../../../client/app/assets/javascripts/clickHandlers.js"],"sourcesContent":["import $ from 'jquery';\n\n$('.cb.expand-collapse-button').click(function () {\n const id = $(this).attr(\"id\")\n const topSection = $(`#college-board-toggle-top-section-${id}`);\n const bottomSection = $(`#college-board-toggle-bottom-section-${id}`);\n if(topSection.hasClass('closed')) {\n topSection.removeClass('closed')\n topSection.addClass('open')\n bottomSection.removeClass('hidden')\n } else {\n topSection.removeClass('open')\n topSection.addClass('closed')\n bottomSection.addClass('hidden')\n }\n});\n\n$('.q-and-a-question-button').click(function () {\n const id = $(this).attr(\"id\")\n const answerSection = $(`#q-and-a-answer-section-${id}`);\n if (answerSection.hasClass('show')) {\n answerSection.removeClass('show')\n answerSection.addClass('hide')\n } else {\n answerSection.removeClass('hide')\n answerSection.addClass('show')\n }\n});\n\n$('.q-and-a.expand-collapse-button').click(function () {\n const id = $(this).attr(\"id\")\n const answerSection = $(`#q-and-a-answer-section-${id}`);\n const innerTextElement = $(this).children('p').eq(0)\n const innerImgElement = $(this).children('img').eq(0)\n const expandSrc = 'https://assets.quill.org/images/shared/expand.svg'\n const collapseSrc = 'https://assets.quill.org/images/shared/collapse.svg'\n\n if (answerSection.hasClass('show') && innerTextElement.length !== 0) {\n innerTextElement.text('Expand')\n answerSection.removeClass('show')\n answerSection.addClass('hide')\n } else if (answerSection.hasClass('show') && innerImgElement.length !== 0) {\n innerImgElement.attr('src', expandSrc)\n answerSection.removeClass('show')\n answerSection.addClass('hide')\n } else if (answerSection.hasClass('hide') && innerTextElement.length !== 0) {\n innerTextElement.text('Collapse')\n answerSection.removeClass('hide')\n answerSection.addClass('show')\n } else if (answerSection.hasClass('hide') && innerImgElement.length !== 0) {\n innerImgElement.attr('src', collapseSrc)\n answerSection.removeClass('hide')\n answerSection.addClass('show')\n }\n});\n"],"names":["$","id","topSection","bottomSection","answerSection","innerTextElement","innerImgElement"],"mappings":"gFAEAA,EAAE,4BAA4B,EAAE,M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