Add my own jquery code
-
Hi, i have made a pen with jquery code : https://codepen.io/nicolastilly/pen/MEvZPL
and i want to use it in my site with Lay theme.I write this in the "Custom CSS & HTML" but it doesn't work:
<script>
window.laytheme.on("newpageshown", function(layoutObj, type, obj){
if(type == "page" && obj.id == 68){jQuery(window).scroll(function() { newNumber=$(window).scrollTop(); newNumber=newNumber*myRatio; jQuery('#carre').css('transform', "rotateZ("+newNumber+"deg)"); }); myRatio= getRatio(20, 337); function getRatio(max, max2) { return max/max2; }
});
</script>
I don't understand very well how can i use jquery code in Lay...
Thanks. -
Hi @Nicolas
can you post a link to your website?Then I can have a look what does not work.
Best!
Marius
-
Hi @Nicolas
Best is if you write an email to marius@thepeople.world and include your username, password and a link to this conversation.
Marius
-
Hi @mariusjopen
I don't understand which username and password do you want in the email? -
Voila! :-)
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- 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:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it