I have a little question. Our agency is working with Drupal, but we want to change some little things by ourselves. I'm skilled in HTML/CSS but not really in JS.
Now I have a problem. I paste my HTML code into a content part.
This is my HTML code:
<div class="accordion">
<div>
<input type="radio" name="acc" id="question01" checked="">
<label for="question01">question</label>
<div class="accordion-content">
<p>content</p>
</div>
</div>
It should be an accordion just with CSS. It works fine local but in the Drupal system there is a Javascript function which adds a <div>
element around the <input>
so my CSS doesn't work anymore which means I can't open the accordion anymore.
The HTML in Drupal:
<div class="accordion">
<div>
<div class="medium styledRadio" style="background-image: url("/assets/img/sprite-radiobuttons-medium.png"); width: 23px; height: 24px; cursor: pointer; background-position: 0px 0px;">
<input checked="checked" id="question01" name="acc" type="radio" class="medium" style="display: none;">
</div>
<label for="question01">question</label>
<div class="accordion-content">
<p>content</p>
</div>
</div>
So my question is: Is there an easy way to overwrite this JavaScript? Maybe there is a short solution for removing this extra <div>
just in the class="accordion"
which I can add in this content part.