Using HTML widget to add javascript event handlers.
-
Hi,
I want to use the HTML widget to add javascript event handlers. A simple exampel is a button widget with a click javascript handler;
(below is text in HTML widget)
<script type=’text/javascript’>$(document).ready(function(){
$(“#contact”).click(function(){
$(this).hide();
});
});</script>
The problem is to uniquely id (id=’contact’) the button so the event handler executes on the correct object. In the wordpress editor it is not seen as a button & I can not modify it there because it is overwritten the next time Elementor saves the page. I can not set a name or id attribute in elementor for it. What gives?
Oddvard
- The topic ‘Using HTML widget to add javascript event handlers.’ is closed to new replies.