[ANSWERED] html – Accordion in django include template
Solution 1 : firstly at last line — put {% endblock %} instead of {% block content %} and if this does not make then try {% extends “barebase.html” %}…
Solution 1 : firstly at last line — put {% endblock %} instead of {% block content %} and if this does not make then try {% extends “barebase.html” %}…
Solution 1 : You can try below code. Get hash url from window.location.hash. Using hash URL find the anchor tag with this hash URL. Added initial class to accordion container…
Solution 1 : I tried to do it as procedurally as possible as that seemed to be what you were going for in your JS. I added value attributes to…
Solution 1 : There is attr method atjquery for set attribute https://api.jquery.com/attr/. Also var $currQuestion = $accordionToggles.eq(i), $currAnswer = $currQuestion.closest('dt').next('dd') here you declare question as a single element, and answer…
Solution 1 : You just needed to include Font Awesome in your header on the page. You can see the icon showing up in the code snippet below. No other…
Solution 1 : Try to set the overflow for the div element with class description to hidden like below .description{ background-color: rgb(219, 219, 219); padding: 10px; height: 0px; visibility: hidden;…
Solution 1 : You would want to have add the JavaScript to the Js section of the text area. Also if html sanitation is on then the tags would not…
Solution 1 : Your spacing is increasing because you have <div class='row'> inside button, and that button is adjusting its width according to content inside it hence that button that…
Solution 1 : Just add this at the beginning of the click event handler $('.accordion-item').not($(event.target).parent()).removeClass('is-open'); Here is a working snippet (fiddle): $(function() { $('.accordion .accordion-title').on('click', toggleAccordion); function toggleAccordion(event) { var…
Solution 1 : Here is my solution: var acc = document.getElementsByClassName("accordion"); var i; for (i = 0; i < acc.length; i++) { //this is where magic happens if(i==0){ acc[0].classList.toggle("active"); var…