Im using a form inside colorbox.js popup window. I want to submit the data using ajax but it doesn't work.
here is the link i click to show the popup colorbox.js window:
<a href="demande-emploi.php" class="ajax cboxElement" title="Demande d'emploi">Demanded'emploi</a>
here is the content of (demande-emploi.php) file:
<div style="height:450px; width:580px; padding:30px 10px; margin: 0 auto;">
<div id="message"></div>
<form action="" method="POST">
<div class="clearfix">
<div class="input">
<label class="labels"> Poste à offrir:</label>
<input type="text" id="poste_to_offre">
</div>
</div>
<div class="clearfix">
<div class="input">
<label class="labels"> A propos:</label>
<textarea rows="9" id="apropos" class="textareas"></textarea>
</div>
</div>
<div class="input">
<label class="labels">Ville:</label>
<input type="text" name="ville">
</div>
<div class="clearfix">
<div class="input">
<label class="labels">Tél/GSM:</label>
<input type="text" id="tel">
</div>
</div>
<div class="clearfix">
<div class="input">
<label class="labels"> Adresse:</label>
<textarea rows="3" id="address" class="textareas"></textarea>
</div>
</div>
<br>
<button type="submit" class="wpb_btn-small" id="send">Envoyer</button>
</form>
</div>
Here, I just want to test if the callback of the ID=send will respond or not but it doesn't work.
<script>
$(document).ready(function(){
$("#send").on('click',function(e){
e.preventDefault();
$("#message").html("Blah Blah Blah......");
});
});
</script>
</div>