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. Addons
  3. Custom Js not working with Fullscreen Slider Slider

Custom Js not working with Fullscreen Slider Slider

Scheduled Pinned Locked Moved Addons
7 Posts 2 Posters 232 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.
  • K Offline
    K Offline
    kalamakumaran
    wrote on last edited by kalamakumaran
    #1

    Hej guys,

    i want a specific div to fade out on scroll. I tried the following and it works but only when the fullscreen slider is set up in free-scroll mode:

    <script>

    jQuery(window).scroll(function() {
    
    if (jQuery(this).scrollTop()>0)
     {
        jQuery('.specific-div').fadeOut(500);
     } });
    

    </script>

    I want the Fullscreen Slider to work in Auto-Mode. But then the Custom JS is not working anymore. Do you have any ideas what part of the Auto-Mode is not working with the Custom Code?

    Thanks and keep up the great work!
    Basti

    edit:
    For a better understanding, here's my website

    I want the overlay that shows up when you click on info to disappear if the you scroll in any direction.

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kalamakumaran
      wrote on last edited by
      #2

      edit:
      If I tick "Show Scrollbar" to be active the desired effects is also working.

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

        Dear @kalamakumaran

        Scrolling once having clicked "info" does make the ".specific-div" fade away,
        Am i missing something or have you solved the issue?

        The "X" "close-button" also needs to be asked to fade away by jQuery.

        Best wishes
        Richard

        1 Reply Last reply
        0
        • K Offline
          K Offline
          kalamakumaran
          wrote on last edited by
          #4

          Yeah sure, it works when the fullscreen slider is set to free scroll. But when I choose auto scroll (snap to scroll) both, the info container and the x-Button don‘t fade out....

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

            Dear @kalamakumaran

            The Page in Question shows me a 404 error,
            Apologies for not replying sooner, would love to come to a solution :)

            Let me Know

            Best Wishes
            Richard

            1 Reply Last reply
            0
            • K Offline
              K Offline
              kalamakumaran
              wrote on last edited by kalamakumaran
              #6

              Dear @Richard-Keith
              i recently moved the website to another domain.
              I found a workaround myself.
              That did it for the desktop version:

              <script>
              window.laytheme.on("newpageshown", function(layoutObj, type, obj){
              jQuery('html').bind('mousewheel DOMMouseScroll', function (e) {
                  jQuery('div').fadeOut(100)
              });
              });
              </script>
              

              And that one for touch devices:

              <script>
              window.laytheme.on("newpageshown", function(layoutObj, type, obj){
              jQuery(document).on('touchmove', function() { 
                jQuery('div').fadeOut(100)
              });
              });
              </script>
              

              But thanks for coming back to me ;)
              Here's the new one: www.arch.bastianlandgraf.de

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

                Dear @kalamakumaran

                Great to hear :)
                Thank you for posting a clear example of your solution as well, this really helps others in the Forum Community.

                Best wishes & good luck for the future.

                Sincerely
                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