I actually just solved it ! I entered the scripts in the Top and not in the Head now it's working fine ! Thanks
ThibaultDuchesne
Posts
-
Scroll to specific object on click -
Scroll to specific object on clickHey! 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 !
-
Scroll to specific object on clickHi !
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