jquery - Javascript alert more than one -
for reason i'm getting alert more once. here code:
$('.input-append.date').datepicker({ format: "mm yyyy", startview: 1, minviewmode: 1, autoclose: true }); $('.input-append.date').on('change', function() { var 1 = $("#month").val(); alert(one); homecoming false; }); <div class="input-append date"> <input id="month" type="text" placeholder="select month" class="span8"><span class="add-on"><i class="icon-th"></i></span> </div> why that? here demo : http://jsfiddle.net/hfudg/168/
please help , in advance.
not sure why change fires multiple times if bind hide, fires once.
$('.input-append.date').on('hide', function() { var 1 = $("#month").val(); alert(one); homecoming false; }); javascript jquery datepicker twitter-bootstrap-2
No comments:
Post a Comment