When ever I try adding the second function, the JavaScript ceases to work on the page. Can you guys help with possible error it is? Thanks.
Note: If I comment out the second function, it works fine and the PHP code is an element from CaKePHP.
<script type="text/javascript">
$(document).ready(function() {
$("#is_sublet").click(function() {
$("#sublet_dates").slideToggle();
return false;
});
});
$(document).ready(function() {
$("#custom_rates").click(function() {
$(".avi_specialrates").append($('<?php echo $this->element('custom_price_per_night', array('config' => 'sec')); ?>');
return false;
});
});
</script>
I think you have a syntax error. Change:
by
One parentheses is missing