Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

S

Sarah Delling

@Sarah Delling
About
Posts
3
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Accordion // Jqueri loading issues
    S Sarah Delling
    Feb 19, 2025, 9:01 AM

    works! beyond happy now – thanks :) I´ll do.

    Bug Reports

  • Accordion // Jqueri loading issues
    S Sarah Delling
    Feb 19, 2025, 8:50 AM

    Thanks so much! 🤗 Looking foward for many more to come.

    And sorry, I have to ask again – I´m new to the game trying to learn.

    I inserted it like this now and think I made sth wrong, because now the pictures on the whole website are not loading.

    <script>

    window.laytheme.on('newpageshown', function(){
    $(".accordion-title").off("click").on("click", function() {
    var content = $(this).next(".accordion-content");

    if (content.is(":visible")) {
        content.slideUp(300).css("display", "none");
        $(this).removeClass("active");
    } else {
        $(".accordion-content").slideUp(300).css("display", "none"); // Alle schließen
        $(".accordion-title").removeClass("active");
    
        content.css("display", "block").hide().slideDown(300); // Sichtbar machen
        $(this).addClass("active");
    }
    

    });
    });

    </script>

    Bug Reports

  • Accordion // Jqueri loading issues
    S Sarah Delling
    Feb 19, 2025, 8:25 AM

    I use an accordion on this website for the services description, here:
    https://zahnarztpraxis-alteglofsheim.de/leistungen/

    I have inserted it as custom code. It is inserted as follows:

    1. html-Element on my specific page "services" in pages:

    <div class="custom-accordion">
    <div class="accordion-item">
    <button class="accordion-title">XXX</button>
    <div class="accordion-content">
    <p>XXX</p>
    </div>
    </div>

    2. CSS in Lay Theme Options Custom Code:

    .custom-accordion {
    max-width: 800px;
    margin: 0 auto;
    }

    .accordion-item {
    border-bottom: 1px solid #ccc;
    }

    .accordion-title {
    width: 100%;
    text-align: left;
    padding: 15px;
    background: none;
    border: none;
    font-size: 40px;
    font-family: 'Belwe Std light';
    cursor: pointer;
    transition: all 0.3s ease;
    color: #e4e1da
    }

    .accordion-title:hover {
    color: #000;
    }

    .accordion-content {
    display: none;
    overflow: hidden;
    opacity: 1;
    max-height: none;
    color: #000;
    padding: 10px 15px;
    animation: fadeIn 0.3s ease-in-out;
    font-size: 16px;
    color: #000;
    line-height: 1.5;
    font-family: 'PTMono-Regular';
    text-align: left;
    }

    3. HTML-Code footer in Lay Theme Options Custom Code

    <script>

    jQuery(document).ready(function($) {
    $(".accordion-title").off("click").on("click", function() {
    var content = $(this).next(".accordion-content");

        if (content.is(":visible")) {
            content.slideUp(300).css("display", "none");
            $(this).removeClass("active");
        } else {
            $(".accordion-content").slideUp(300).css("display", "none"); // Alle schließen
            $(".accordion-title").removeClass("active");
    
            content.css("display", "block").hide().slideDown(300); // Sichtbar machen
            $(this).addClass("active");
        }
    });
    

    });

    </script>

    NOW: the problem :)

    The accordion is showing, working super fine, BUT only if I do a hard refresh loading on the site. The accordion doesn´t work/open when the page is loading for the first time. So I feel like the jQuery needs the hard refresh to work.

    Is there any way to fix this issue?

    Thanks so much for advices!

    Bug Reports

I also code custom websites or custom Lay features.
💿 Email me here: 💿
info@laytheme.com

Before you post:
  1. When using a WordPress Cache plugin, disable it or clear your cache.
  2. Update Lay Theme and all Lay Theme Addons
  3. Disable all Plugins
  4. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"

This often solves issues you might run into

When you post:
  1. Post a link to where the problem is
  2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
  3. If the problem is difficult to explain, post screenshots / link to a video to explain it
Online Users
arminunruhA
arminunruh
10 minutes ago
Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
laytheme.com
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Recent
  • Tags
  • Popular
  • Users
  • Search