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. Bug Reports
  3. Help! Sticky element doesen't work for me...

Help! Sticky element doesen't work for me...

Scheduled Pinned Locked Moved Bug Reports
18 Posts 2 Posters 163 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.
  • D Offline
    D Offline
    dnlbrv
    wrote on last edited by
    #1

    Hello all,

    Its imposible for me to place a functionally stick element.

    Link:
    https://www.secretsfilms.com/site/en/alexis_taule_home-copy

    Any idea??

    Thanxs in advance!

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

      hello did you read this?
      Screenshot 2025-07-23 at 16.01.03.png

      the text where you make sth sticky

      also on your page i cant scroll. to have an element be sticky, you need a scrollable page

      and the elment will only be sticky inside it's row

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dnlbrv
        wrote on last edited by
        #3

        Hello
        you can click on "Cosmetic" and scroll

        1 Reply Last reply
        0
        • D Offline
          D Offline
          dnlbrv
          wrote on last edited by
          #4
          This post is deleted!
          1 Reply Last reply
          0
          • D Offline
            D Offline
            dnlbrv
            wrote on last edited by
            #5

            I'm actually looking for a way to have "Cosmetic" displayed when you first load the page.

            1 Reply Last reply
            0
            • arminunruhA Offline
              arminunruhA Offline
              arminunruh
              Global Moderator
              wrote on last edited by
              #6

              you are using the expand row functionality?
              then simply right click the collapsed cosmetic row and click "expand row"
              Screenshot 2025-07-23 at 17.39.30.png

              your text you want to have sticky is just a text inside a row.
              sticky elements are only sticky within their own row as you can read in the text of the sticky module

              i think you want the row to be sticky where you have your text inside.

              Please right-click that row where do you have this text inside:
              Screenshot 2025-07-23 at 17.40.48.png

              Then choose set HTML class and id.
              For HTML class, enter:

              sticky-row

              now, Enter this css in "lay options" -> "custom css & html" -> "custom css for desktop"

              .sticky-row{
              position: sticky!important;
              top: 0px!important;
              z-index: 90!important;
              }
              
              1 Reply Last reply
              0
              • D Offline
                D Offline
                dnlbrv
                wrote on last edited by
                #7

                ah! okey is in the row! Thanxs a lot!

                1 Reply Last reply
                0
                • D Offline
                  D Offline
                  dnlbrv
                  wrote on last edited by
                  #8

                  The expand row issue is more complicated for me. My client wants to display an "element grid" with different images depending on the category. I'm trying to replicate the functionality of the categories with the "expand row." With CSS, I disabled the closing of the row when it's already open. Now I'm looking for a way to have the first "cosmetics" category open when the page loads.

                  With CSS, I disabled the open row:
                  .expand-link-clicked {
                  cursor: not-allowed;
                  pointer-events: none;
                  }

                  I'm looking for a way to have "cosmetics" open:

                  #grid.id-801 .row-3 {
                  data-collapsed="false" !important;
                  }

                  But it doesn't work. I think I'll have to try using JS:
                  Any ideas?

                  1 Reply Last reply
                  0
                  • D Offline
                    D Offline
                    dnlbrv
                    wrote on last edited by
                    #9

                    If I leave the row expanded as you said, the button state is not ".expand-link-clicked" and when I click it the row closes and the functionality logic of a category menu does not work.

                    1 Reply Last reply
                    0
                    • arminunruhA Offline
                      arminunruhA Offline
                      arminunruh
                      Global Moderator
                      wrote on last edited by arminunruh
                      #10

                      So what you'd need to do is, you click the point using javascript.

                      i can't open the site anymore:
                      https://www.secretsfilms.com/site/en/alexis_taule_home-copy/

                      but basically what you do is

                      <script>
                      window.laytheme.on('newpageshown', function(){
                      jQuery('a[data-expand="39"]').click()
                      })
                      </script>
                      

                      Enter this css in "lay options" -> "custom css & html" -> "custom head content"

                      obviously you can't use 'a[data-expand="39"]'

                      instead, you need to find out the correct data-expand id by using inspect element
                      Screenshot 2025-07-24 at 07.27.59.png

                      1 Reply Last reply
                      0
                      • D Offline
                        D Offline
                        dnlbrv
                        wrote on last edited by
                        #11

                        Hey,
                        if I put the script:

                        <script>
                        window.laytheme.on("newpageshown", function() {
                        jQuery('a[data-expand="13"]').click()
                        });
                        </script>

                        page don't load. Only the menu is visible and the error in console says:
                        [Error] TypeError: undefined is not an object (evaluating 'Gs.find')
                        (anonymous function) (frontend.app.min.js:1:238436)
                        dispatch (jquery.min.js:2:40041)
                        trigger (jquery.min.js:2:70130)
                        (anonymous function) (jquery.min.js:2:70734)
                        each (jquery.min.js:2:3134)
                        (anonymous function) (alexis_taule_home-copy:2773)
                        emit (events_channels.min.js:1:1741)
                        (anonymous function) (frontend.app.min.js:1:302722)

                        Any idea? Thanks in advance

                        1 Reply Last reply
                        0
                        • D Offline
                          D Offline
                          dnlbrv
                          wrote on last edited by
                          #12

                          I tray activate the button but dont work:

                          <script>
                          window.laytheme.on("newpageshown", function() {
                          jQuery('body.type-project.id-801 .btn_accion').trigger('click');
                          });
                          </script>

                          1 Reply Last reply
                          0
                          • arminunruhA Offline
                            arminunruhA Offline
                            arminunruh
                            Global Moderator
                            wrote on last edited by arminunruh
                            #13
                            <script>
                            window.laytheme.on('newpageshown', function(){
                            if(jQuery('a[data-expand="13"]').length > 0){
                            jQuery('a[data-expand="13"]').click();
                            }
                            })
                            </script>
                            

                            the website seems to be online again.
                            the above should be the correct code. i included a check, and i inserted the correct id

                            i think this code is wrong:
                            <script>
                            window.laytheme.on("newpageshown", function() {
                            jQuery('body.type-project.id-801 .btn_accion').trigger('click');
                            });
                            </script>

                            can you use my code above and show a screenshot where you added it

                            1 Reply Last reply
                            0
                            • D Offline
                              D Offline
                              dnlbrv
                              wrote on last edited by
                              #14

                              After put your code, console says:
                              [Error] TypeError: undefined is not an object (evaluating 'Gs.find')
                              (anonymous function) (frontend.app.min.js:1:238436)
                              dispatch (jquery.min.js:2:40041)
                              trigger (jquery.min.js:2:70130)
                              (anonymous function) (jquery.min.js:2:70734)
                              each (jquery.min.js:2:3134)
                              (anonymous function) (alexis_taule_home-copy:2797)
                              emit (events_channels.min.js:1:1741)
                              (anonymous function) (frontend.app.min.js:1:302722)

                              In the screenshot you see where I added the code.

                              Screenshot 2025-07-24 at 20.06.32.png

                              1 Reply Last reply
                              0
                              • arminunruhA Offline
                                arminunruhA Offline
                                arminunruh
                                Global Moderator
                                wrote on last edited by arminunruh
                                #15

                                can you update lay theme now and try if it works now?
                                i think now you shouldnt get the error anymore.

                                seems like there was an issue with the compatibility of lay theme's code and the code i gave you

                                1 Reply Last reply
                                0
                                • D Offline
                                  D Offline
                                  dnlbrv
                                  wrote on last edited by
                                  #16

                                  I send the email
                                  Thanxs a lot

                                  1 Reply Last reply
                                  0
                                  • arminunruhA Offline
                                    arminunruhA Offline
                                    arminunruh
                                    Global Moderator
                                    wrote on last edited by
                                    #17
                                    <script>
                                        window.laytheme.on('newpageshown', function(){
                                            if(jQuery('a[data-expand="13"]').length > 0){
                                                setTimeout(function(){
                                                    console.log("hello!")
                                                    jQuery('a[data-expand="13"]').click();
                                                }, 1000)
                                            }
                                        })
                                    </script>
                                    

                                    seems that with the new update and this timeout it works

                                    1 Reply Last reply
                                    0
                                    • D Offline
                                      D Offline
                                      dnlbrv
                                      wrote on last edited by
                                      #18

                                      Yeah, now works perfect.

                                      thanxs again! Lay theme are the f****g best!

                                      1 Reply Last reply
                                      1
                                      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