function eventLike(id,o) { t = $.ajax({ url:"/event/action/like", type:"POST", async:false, data:"eid="+id }).responseText; a = $.parseJSON(t); if(a.alert!="") message.show(a.alert); $(o).children().html(a.count); return false; } function eventAttend(id,o) { t = $.ajax({ url:"/event/action/attend", type:"POST", async:false, data:"eid="+id }).responseText; a = $.parseJSON(t); if(a.alert!="") message.show(a.alert); $(o).children().html(a.count); return false; } $(document).ready( function() { $(".page-filters select").bind("change",function(){ $(".page-filters").parent("form").submit(); }); });