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

T

ThibaultDuchesne

@ThibaultDuchesne
About
Posts
3
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Scroll to specific object on click
    T ThibaultDuchesne
    Apr 26, 2016, 12:41 PM

    I actually just solved it ! I entered the scripts in the Top and not in the Head now it's working fine ! Thanks

    General Discussion

  • Scroll to specific object on click
    T ThibaultDuchesne
    Apr 26, 2016, 12:24 PM

    Hey! I tried exactly with the code you suggested in the documentation

    <script>
    jQuery("body").on("click", ".clickme", function(event) {
    console.log("yay!");
    });
    </script>

    and gave a class clickme to an image (with the little class button)
    But nothing appears in the log when I click on it... it's in a project page, I'm using arrows (previous/next) on that page also. The mouse pointer doesn't change, and nothing appears in the logs... I tried on a clickable object (a button) still nothing.

    What do you think that could be ? I tried the other script you suggested in the doc Newpage Events, and some stuffs appear in the log that time.

    Thnks !

    General Discussion

  • Scroll to specific object on click
    T ThibaultDuchesne
    Apr 25, 2016, 2:55 PM

    Hi !
    I've been using Lay Theme since a bit, and I'm currently trying to push a little further my website.
    I basically try to create a scroll to specific object on lick function (combining with the click events, to have scroll on click with all objects with a specific class)
    I've been looking at the guidelines in the "custom script" documentation section, especially the "Binding Click Events", but I tried and seems that it's not working (nothing in the log when clicking...)
    How could we apply that short simple code ? (combining the click events with a scroll to function)

    <script>
    $("button").click(function() {
    $('html,body').animate({
    scrollTop: $(".second").offset().top},
    'slow');
    });
    </script>

    Thank you very much!

    Thibault

    General Discussion

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
H
henrinternet
8 minutes ago
M
MWPA
28 minutes ago
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