Javascript onClick not working
-
Hello dear community,
on my clients website I’m using a Smart Slider as Header. This Header is including a Call to Action button to arrange a video-call, which is linked to Calendly.
The code for the button has been generated by Calendly. I’m using it in the static header on the mainpage as well (to get there, click on the logo top left corner) and its working properly.
In my slider I added the code to the “Developer”-Tab under “JavaScript Callbacks”. This is how it looks:
jQuery(document).ready(function(){ jQuery('.btn-calendly').click(function(e){ e.preventDefault(); Calendly.initPopupWidget({url: 'https://calendly.com/sokolov-steuerkanzlei/30min'}); return false; }); });
The script file is embedded in the template itself and I checked in the debugger, that it’s getting loaded:
<script src="https://assets.calendly.com/assets/external/widget.js" type="text/javascript"></script>
But when I hit the button in the Slider, the script is not executed properly and afterwards the vertical scrollbar is disappearing.
Any suggestions what I am doing wrong?
- This topic was modified 4 years, 2 months ago by .
- This topic was modified 4 years, 2 months ago by .
The page I need help with: [log in to see the link]
- The topic ‘Javascript onClick not working’ is closed to new replies.