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. Replace the previous and next slider buttons with text

Replace the previous and next slider buttons with text

Scheduled Pinned Locked Moved General Discussion
4 Posts 2 Posters 117 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
    Antoine.dvc
    wrote on last edited by
    #1

    Hello,

    Is it possible to replace the previous and next buttons of the slider with text? (write with the typography of the site "previous" on the left, "next" on the right.)

    Thank you very much!

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

      Dear @Antoine-dvc

      Not with standard options and will need to be custom coded by you - but I can set you in the right direction 🌝

      https://laytheme.com/documentation/custom-javascript.html

      https://laytheme.com/documentation/custom-css-styling.html

      https://stackoverflow.com/questions/1309452/how-to-replace-innerhtml-of-a-div-using-jquery


      The following jQuery will target the classes next & previous relating to the Carousel ( you probably should specify which next and previous if there are multiple on your website) And change the inner HTML ( an image ) to some Text.

      jQuery('.next').html('next');
      
      jQuery('.previous').html('Previous');
      
      

      Screen Shot 2022-01-25 at 9.15.45 AM.png

      You will also need to define some CSS for your text to match the design of your website:

      .next{
          font-family: georgia,palatino,serif;;
          font-size:35px;
      }
      

      Screen Shot 2022-01-25 at 9.18.23 AM.png


      Hope this helps & best wishes
      Richard
      1 Reply Last reply
      0
      • A Offline
        A Offline
        Antoine.dvc
        wrote on last edited by
        #3

        @Richard said in Replace the previous and next slider buttons with text:

        And change the inner HTML ( an image ) to some Text.

        Hi Richard, Thanks for your feedback.

        I understand pretty much, however how can I change the inner HTML ( an image ) to some Text ? I managed in the google chrome console to make "previous" appear by including this line "<button class="flickity-prev-next-button previous" type="button">previous</button>" however I can't seem to do it in the laytheme.

        Here'is a screenshot
        Thanks a lot,

        Capture d’écran 2022-01-25 à 10.32.30.png

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

          Dear @Antoine-dvc

          As a first test wrap the code into a 'newpage event" within your Custom <head> Content:

          https://laytheme.com/documentation/custom-javascript.html

          <script>
          window.laytheme.on("newpageshown", function(){
          
          // insert your desired code here
          
          });
          </script>
          

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