Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Brite
  • 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

  1. Home
  2. General Discussion
  3. "Read more"-Button

"Read more"-Button

Scheduled Pinned Locked Moved General Discussion
7 Posts 4 Posters 2.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L
    L
    lars
    wrote on last edited by
    #1

    I’d like to implement a Read more button underneath my text block to expand and collapse it.

    I read the following forum post but unfortunately the codepen is no longer available and I couldn’t get it to work after inspecting the original posters website.

    I would like to know which content blocks need to be assigned the classes mentioned in the javascript.

    Re: "Read more" button

    1 Reply Last reply
    0
    • mariusjopenM
      mariusjopenM
      mariusjopen
      Global Moderator
      wrote on last edited by
      #2

      Dear @lars

      this is an accordeon thing you need top code yourself.
      There is nothing by LayTheme preinstalled.

      Have a look at this fiddle:
      https://jsfiddle.net/mariusjopen/r63w9jfg/

      Best!

      Marius

      www.mariusjopen.world

      1 Reply Last reply
      0
      • L
        L
        lars
        wrote on last edited by
        #3

        @mariusjopen said in "Read more"-Button:

        https://jsfiddle.net/mariusjopen/r63w9jfg/

        Dear Marius,

        thank you very much, thats exactly what I wanted!

        I put the the javascript in the header section as well as the css in the custom css section.
        For the HTML I tried both the +HTML block as well as a +Text block. Unfortunately neither of them are working at the moment.

        https://larswinter.me/wordpress

        1 Reply Last reply
        0
        • mariusjopenM
          mariusjopenM
          mariusjopen
          Global Moderator
          wrote on last edited by
          #4

          Dear @lars
          did you have a look here?

          http://laytheme.com/documentation.html#custom-javascript

          Because your Lay Theme website is a "Single Page" JavaScript application you cannot just use jQuery(document).ready(…) to execute your js because the ready event only fires once when the website loads the first time.

          Best!

          Marius

          www.mariusjopen.world

          D 1 Reply Last reply
          0
          • mariusjopenM mariusjopen

            Dear @lars
            did you have a look here?

            http://laytheme.com/documentation.html#custom-javascript

            Because your Lay Theme website is a "Single Page" JavaScript application you cannot just use jQuery(document).ready(…) to execute your js because the ready event only fires once when the website loads the first time.

            Best!

            Marius

            D
            D
            dingdong
            wrote on last edited by
            #5

            @mariusjopen
            Is there a fixed link?
            I want to do the same, but the link is broken?!
            thx :)

            1 Reply Last reply
            0
            • R
              R
              Remco van Dun
              wrote on last edited by
              #6

              @dingdong Have a look at what I made before, it might work for you.

              http://laythemeforum.com/topic/4896/accordion-bug/23?_=1643372835433

              Test:
              https://remcovandun.nl/home/accordeon/

              D 1 Reply Last reply
              0
              • R Remco van Dun

                @dingdong Have a look at what I made before, it might work for you.

                http://laythemeforum.com/topic/4896/accordion-bug/23?_=1643372835433

                Test:
                https://remcovandun.nl/home/accordeon/

                D
                D
                dingdong
                wrote on last edited by
                #7

                @Remco-van-Dun THX!!!
                worked perfect for me, just had to change
                "panel.style.maxHeight" into more than 200px :D

                1 Reply Last reply
                1

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                Online Users
                D
                Dawid
                L
                lstark
                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