0
$(document).ready(function () {
   $(".datepicker").on("change", function () {
      console.log("success");
  });
});

When I click on my datepicker in my console I get the following result:

success
success
success

I do not know why it is three time, but I need it only once. So at the end of the function I put

$(this).unbind( "change" );

Now in my console the result is like expected:

success

But now, if I select the datepicker another time, then nothing is happening in the console.

The result I which is I want to be able to click the datepicker multiple times, but EACH time I click it, the console should show only ONCE:

success

http://jsfiddle.net/LcqM7/982/

peace_love
  • 6,229
  • 11
  • 69
  • 157

0 Answers0