I've got a wordpress site running. I've bound a jquery click event to a <div> tag using the ID as a selector.
The relevant code is below: js:
<script>
$(document).ready(function() {
$( "#homepage_contact_form" ).click(function() {
alert( "Handler for .click() called." );
});
});
</script>
html:
<div id="homepage_contact_form" class="et_pb_module et_pb_contact_form_container clearfix et_pb_contact_form_0">
However, the event is not triggering.
The thing works if I simulate it in jsfiddle (https://jsfiddle.net/yL4gjc1d/), but it doesn't work on the actual page.
Relevant information:
- This is a Wordpress site using the Divi theme. The js is being inserted through the ePanel
- You can find the actual page with the source code above at http://www.inkcorporate.com
Thanks