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

  1. Home
  2. General Discussion
  3. adding text slide

adding text slide

Scheduled Pinned Locked Moved General Discussion
5 Posts 2 Posters 1.3k Views
  • 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.
  • A Offline
    A Offline
    alessia.pennetta
    wrote on last edited by
    #1

    Hi Armin
    How can i add a text slide like in this example when clicking on i for info:
    http://www.neesermueller.ch/#goldschmiede-martin-kurt-inserate
    I want the text on my website appearing only when clicking on a "button".
    Is this possible?
    Thank you a lot in advance.

    Alessia

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

      Hey Alessia!

      You can give an element a class or id.
      This div you can show or hide when you click on a button.

      You will need some basic jQuery knowledge to do that.

      Have a look here:
      http://jsfiddle.net/e27Dt/

      Let me know if you have questions.

      Best!

      Marius

      www.mariusjopen.world

      1 Reply Last reply
      0
      • A Offline
        A Offline
        alessia.pennetta
        wrote on last edited by
        #3

        Hi Marius
        Thank you a lot for your response. Is there no possibility to do that without jquery? Because i have no knowledge at all. Or maybe only with a css change, without touching the html?
        Thanks.
        Best!
        Alessia

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

          Hi Alessia,

          mhm. Not really. You cannot work with pure CSS.

          jQuery is actually made for exactly those interactions.

          Ok, I solved it for you in a way.
          If you want to get more specific or into detail you should make a jQuery course at Codeacademy. Very useful in general.

          Here we go:

          The Button Text will be the button. The image is hidden and will be visible on click.
          0_1504684964978_Bildschirmfoto 2017-09-06 um 09.46.43.png

          You give the button the class .buttonand the image the class .hide.
          0_1504685193728_Bildschirmfoto 2017-09-06 um 10.06.17.png

          0_1504685201294_Bildschirmfoto 2017-09-06 um 10.06.24.png

          Then in the custom HTML section you will add the following in the CSS box:

          .hide {
              display: none;
          }
          
          .show {
              display: block !important;
          }
          

          And this in the Custom Head Content box:

          <script>
          jQuery(document).on("click", ".button", function(event) {
          	 jQuery(".hide").toggleClass("show");
          });
          </script>
          

          That should work. it is the basic. From there on you can built it up yourself.

          All the best!

          Marius

          www.mariusjopen.world

          1 Reply Last reply
          0
          • A Offline
            A Offline
            alessia.pennetta
            wrote on last edited by
            #5

            Hi Marius,
            Thank you so much for your big and quickly help. It works. I'm so happy, you made my day:)!

            Best!
            Alessia

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


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