Viewing 7 reply threads
You must be logged in to reply to this topic.
Hi, I am unable to add a customer JS funciton and run it on button click.
For example: I added to Specular->General->”Custom JS Code” the following line:
function scrollToSmoothly(pos, time) {… do something …}
And then in one of my pages I added a button with onClick=”scrollToSmoothly(500, 3000)
But clicking the button never runs the function. I even tried it with a very simple JS function that just doing alert(‘Hello World’) but again it is never called.
Any assistance will be appreciated.
Hi,
First Please check after adding js function, does it added into inline js by view source?
Your code is being saved properly into js box or not.
Thanks,
Hi,
Please share your website URL, wp-admin, and FTP info (Username and password) and send me using “Set as private reply”.
Thanks,
Thank you the problem was solved. The solution was to add the JS function as an Raw HTML block in the body of the HTML. Thank you.
You must be logged in to reply to this topic.