Internal sever error jQuery code
-
Dear Laytheme,
Some time ago I wanted to make a circle turn at the same time as the scroll, for that I used the following jQuery code in the part "Custom <head> content ».
<script> jQuery(window).scroll(function() { var offset = jQuery(window).scrollTop(); offset = offset * 0.4; jQuery('.fixed-element-circle').css({ '-moz-transform': 'rotate(' + offset + 'deg)', '-webkit-transform': 'rotate(' + offset + 'deg)', '-o-transform': 'rotate(' + offset + 'deg)', '-ms-transform': 'rotate(' + offset + 'deg)', 'transform': 'rotate(' + offset + 'deg)', }); }); </script>It worked perfectly fine so far, but since a few days now, once I click on "save changes" on the custom css and html page, I land on an "Internal server error » message.
After some tests to try to solve the problem, I realized it happened with all Jquery code I use, so I had to take them off.
I don’t understand why, can you please give me some help with that ?
Thank you in advance!

-
Hey Laytheme, I'm experiencing the same issue on two websites!
If you have any idea how to fix this please let us know :D -
Dear @Mathilde @jsphbngrnd
Could you please post a link to your websites, and as always to be sure before moving forwards:
-
Wordpress, Lay Theme & Laytheme's Addons are all up to date ?
-
Any Custom CSS or JS that may interfere is temporarily removed.
-
Any third-party plugins de-activated to see if this resolves the issue.
I know this has happened after a recent update, so likely a bug and will need to forward it - If the above do not help:
Could you please send your website address, /wp-admin/ username and password and a link to this topic to info@laytheme.com?
Will stay posted and talk soon!
Best
Richard -
-
-
Dear @Mathilde @jsphbngrnd
Please make sure:
Have you read the documentation about applying jQuery/Javascript to LayTheme & wrapping code in a 'Newpage Event' ?https://laytheme.com/documentation.html#custom-javascript
<script> window.laytheme.on("newpageshown", function(layoutObj, type, obj){ }); </script>Make sure before proceeding :)
Best
Richard -
-
Hey Mathilde,
I believe this could be related to this:
https://laytheme.com/troubleshooting.html#updating-redirects -
hey @Armin-Unruh,
Yes it was related to that, thank you for your help!! It's working again :)
Have a nice day,Mathilde
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login