Dear Marius,
sure. I understand of course .thanks for your reponse.
The thing is that the code is working in JsFiddle.
Best
Chrissi
Dear Marius,
sure. I understand of course .thanks for your reponse.
The thing is that the code is working in JsFiddle.
Best
Chrissi
Hi,
I'm using an accordion on this site www.robin-beratung.de/beratung
The accordion is working, but sometimes it's jumping to the bottom of the page or after clicking it opens and closes a couple of times very fast but it's not able to read the hidden text. Anyone any ideas what the Problem is?
I checked it in Chrome and Firefox... In Safari on my iPhone it's working. Android: same Problem
this is my code Java in <head>
<script>
window.laytheme.on("newpageshown", function(layoutObj, type, obj){
if(type == "page" && obj.id == 26){
// display the first div by default.
jQuery("#accordion div").first().css('display', 'none');
// Get all the links.
var link = jQuery("#accordion a");
// On clicking of the links do something.
jQuery(document).on("click","#accordion a", function(e) {
e.preventDefault();
var id = jQuery(this).attr('href');
this.classList.toggle("open");
jQuery(id).slideToggle();
});
}
});
</script>
Custom CSS
#accordion {
text-align: center;
padding: 0em;
display: block;
text-decoration: none;
line-height: 1em;
}
#accordion a:before {
content: "+";
float: left;
display: block;
}
#accordion .open:before {
content: "\2013";
vertical-align: middle;
float: left;
}
#accordion div {
background:#fafafa;
text-align:left;
display:none;
margin-left: 50px;
margin: 0 auto;
padding: 1em 0 1em 0;
padding-left:1em;
padding-right:1em;
font-size: 1em;
line-height: 1.5em;
border-bottom: 1px solid #2c3e50;
}
.slug-beratung .acc a {
display:block;
background:#fff;
color:#456;
text-decoration:none;
max-width: 100%;
border-bottom: 1px solid #2c3e50;
height: 10%;
line-height: 1em;
padding-bottom: 1em;
}
.slug-beratung .acc a:hover {
color: #e73f56;
}```