Click button add to a counter...
For some reason this won't work:
- $(document).ready(function(){
- var month = 0;
- $("#backMonth").live('click',function(event){
month-=1;
});
- $("#nextMonth").live('click',function(event){
month+=1;
});
- });
When I alert the variable month, it tells me it's 0.
Why?