I included a file named functions.php in my codeigniter view page the fist function in the page was working others are not. Here is my script:
function getCalendar(target_div, year, month) {
$.ajax({
type: 'POST',
url: 'functions.php',
data: 'func=getCalender&year=' + year + '&month=' + month,
success: function(html) {
$('#' + target_div).html(html);
}
});
}
function getEvents(date) {
$.ajax({
type: 'POST',
url: 'functions.php',
data: 'func=getEvents&date=' + date,
success: function(html) {
$('#event_list').html(html);
$('#event_add').slideUp('slow');
$('#event_list').slideDown('slow');
}
});
}
$(document).ready(function() {
$('.date_cell').mouseenter(function() {
date = $(this).attr('date');
$(".date_popup_wrap").fadeOut();
$("#date_popup_" + date).fadeIn();
});
$('.date_cell').mouseleave(function() {
$(".date_popup_wrap").fadeOut();
});
$('.month_dropdown').on('change', function() {
getCalendar('calendar_div', $('.year_dropdown').val(), $('.month_dropdown').val());
});
$('.year_dropdown').on('change', function() {
getCalendar('calendar_div', $('.year_dropdown').val(), $('.month_dropdown').val());
});
$(document).click(function() {
$('#event_list').slideUp('slow');
});
});
so any one pls help me to make it work properly
</div>