jQuery blur function is called twice -
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3 location_detail" style="clear:none !important;"> <div class="col-xs-12 txt_selectd_location">selected locations <div class="col-xs-3 pull-right">qty.</div> </div> <div id="changecont" class="col-xs-12 pad0"> <div class="col-xs-12 unallocate-amount"> <div class="col-xs-8 pad0 bold">unallocated</div> <div class="col-xs-3 pull-right" id="unallocated-stcok-display">200</div> <input type="hidden" id="unallocated-stcok" value="200"> </div> <div class="location_row"> <div class="city"> ahmedabad </div> <div class="city_square square-left"></div> <div class="city_square square-right"></div> <input type="text" id="3" value="0" class="input-in-out share-stock"> </div> <div class="location_row"> <div class="city"> bangalore </div> <div class="city_square square-left"></div> <div class="city_square square-right"></div> <input type="text" id="2" value="0" class="input-in-out share-stock"> </div> <div class="location_row"> <div class="city"> chennai </div> <div class="city_square square-left"></div> <input type="text" id="6" value="0" class="input-in-out share-stock"> </div> <div class="location_row"> <div class="city"> kolkata </div> <div class="city_square square-left"></div> <div class="city_square square-right"></div> <input type="text" id="16" value="0" class="input-in-out share-stock"> </div> <div class="location_row"> <div class="city"> kolkata </div> <div class="city_square square-left"></div> <div class="city_square square-right"></div> <input type="text" id="17" value="0" class="input-in-out share-stock"> </div> <div class="location_row"> <div class="city"> mumbai </div> <div class="city_square square-left"></div> <div class="city_square square-right"></div> <input type="text" id="4" value="0" class="input-in-out share-stock"> </div> <div class="location_row"> <div class="city"> pune </div> <div class="city_square square-left"></div> <input type="text" id="5" value="0" class="input-in-out share-stock"> </div> <div class="location_row"> <div class="city"> vadodara </div> <div class="city_square square-right"></div> <input type="text" id="22" value="0" class="input-in-out share-stock"> </div> </div> </div>
jquery blur function calls twice. how prevent blur function calling twice. calling blur function calculate input given users input field on popup. when enter values input field , click on 'tab' found console print here 2 times. every time click tab iterate event multiple times.
my code is:
jquery(document).on('blur', 'input.share-stock', function(e){ e.preventdefault(); console.log('here'); });
Comments
Post a Comment