jQuery v1.3.2 I have an ajax calendar that loads when the page loads. To change the month I use ajax to update the month view. On each ajax load I replace the calendar container with:
... Calendar code here ... $calHTML .= '<script type="text/javascript"> function call_cal(cal_link){ $.ajax({ type: "POST", cache: false, url: "'.THEME_URL.'ajax/calendar.php", data: cal_link, success: function(html){ $("#calendar").html(html); } }); } $("#prev_month").click(function () { var get_cal = $(this).attr("href"); var cal_link = get_cal.substring(1, get_cal.length); call_cal(cal_link) return false; }); $("#next_month").click(function () { var get_cal = $(this).attr("href"); var cal_link = get_cal.substring(1, get_cal.length); call_cal(cal_link) return false; }); </script>'; In IE 7 the prev_month and next_month buttons stop working after the second click. Any ideas?