Hi Guys,
I know nothing about scripting but I need this script to be converted to JQuery or if jquery then to convert to jscript. Why? The script is not working in my wordpress theme.
In other words I need this script in the other format.
Did you read somewhere or did somebody tell you somewhere that you needed to convert it? Both JavaScript and the JQuery library work with WordPress, but they need to be handled properly. For example, if the script is in an independent file, was it enqueued properly in the functions.php?
And if it is JQuery, are you taking into account that the version of JQuery that comes shipped with WordPress is in compatibility mode, so that it doesn’t conflict with other JavaScript libraries that might be used. This means that instead of using the $ shortcut, you need to use JQuery. For example, instead of $("#myID") you use jQuery("#myID").
I assume this has to do with what you PM’d me the other day - that you have a page, built using WP, and that there are JavaScript errors on that page, possibly caused by using a particular theme. I also assume that the page is still behind a login, meaning that you cannot post a link to it.
To do this, you should start with a blank HTML page, then go to the page you are having problems with and copy the source code (as it is generated by WordPress) into your blank page. If you have any problems with paths and/or includes, use the base URL element to point back to your domain. After that, start stripping out anything that is not relevant to your problem. When you have it down to the minimum, post back here.
P.S. One thing is for sure, converting from vanilla JS to jQuery will not solve your problem.
Hi Pullo how are you
I can do that, but I had 2 freelancers get in, and they tried for hours, the only way they got the form working by putting script in the footer, but then other pages stopped working… That’s why I assume that wherever this script is stopping the page to work…
Note: I’ve tried another simple script and works perfectly in my wordpress, so I guess 100% from the script
If anyone can rewrite the sccript in another way maybe helpful
Hmmm. Where did you find said freelancers? That doesn’t sound right to me…
I don’t think you’ll find anyone to help you, TBH. You say in post #1 that you know nothing about scripting, but yet you’re making random guesses about where the problem lies. And without any kind of code to go on (code which reproduces the error) you’ve got us shooting in the dark.