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. Accordeon-feature or plugin?

Accordeon-feature or plugin?

Scheduled Pinned Locked Moved General Discussion
5 Posts 3 Posters 615 Views 4 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.
  • B
    B
    bbbfg
    wrote on last edited by
    #1

    Hello! :)

    Is there a possibility to add a "more" area to a text module, i.e. an "accordion"?
    (the text is separated at a certain point and when you click on "more", an area with the entire text opens).

    Thanks!

    1 Reply Last reply
    1
    • RichardR
      RichardR
      Richard
      Global Moderator
      wrote on last edited by
      #2

      Dear @bbbfg

      Currently not without coding an accordion - there are threads on this forum where users have done that and also simple ones online that you could implement.

      This is a great idea though and will happily add to the development notes 🌝


      Best wishes
      Richard
      1 Reply Last reply
      1
      • daniD
        daniD
        dani
        wrote on last edited by
        #3

        try this:

        HTML

        <div class="more">Click here for more info</div>
        <div class="less">Here is the hidden content</div>
        

        Use <div> instead of <p>, so that you can use <p> within the hidden content.

        CSS

        /* open close dots - see JS */
        .more:hover:after { 
            content: " ○○○";
        }
        .more:after {
            content: " ●●●";
        }
        .less { 
          display:none; 
        }
        

        JS

        <script>
        window.laytheme.on("newpageshown", function(layoutObj, type, obj){
            
        /* open close dots */  
            jQuery('.more').click(function(){
                jQuery(this).next().slideToggle();
                jQuery('.less').not(jQuery(this).next()).slideUp();
            });
          
        });
        </script>
        

        https://danielcampbell.ca

        daniD 1 Reply Last reply
        1
        • daniD dani

          try this:

          HTML

          <div class="more">Click here for more info</div>
          <div class="less">Here is the hidden content</div>
          

          Use <div> instead of <p>, so that you can use <p> within the hidden content.

          CSS

          /* open close dots - see JS */
          .more:hover:after { 
              content: " ○○○";
          }
          .more:after {
              content: " ●●●";
          }
          .less { 
            display:none; 
          }
          

          JS

          <script>
          window.laytheme.on("newpageshown", function(layoutObj, type, obj){
              
          /* open close dots */  
              jQuery('.more').click(function(){
                  jQuery(this).next().slideToggle();
                  jQuery('.less').not(jQuery(this).next()).slideUp();
              });
            
          });
          </script>
          
          daniD
          daniD
          dani
          wrote on last edited by
          #4

          @dani example:
          http://66.199.141.101/~dbvincze/works/

          https://danielcampbell.ca

          1 Reply Last reply
          1
          • B
            B
            bbbfg
            wrote on last edited by
            #5

            Tank you!

            1 Reply Last reply
            2

            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
            I
            itsbadjujuju
            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