pressAndHold
pressAndHold copied to clipboard
usage on form elements
When i use the script on a form element (as examples below) it fires all the events (start, end, complete) but it does not shows the progress indicator overlay.
Any idea why ?
<input type="button" ... /> or <input type="submit"... />
http://jsfiddle.net/b9dLH/
Yeah, I never tried to get it to work with <input type="button">; only <button>. If I get some time I will see what I can do.
Hi,
Any news on this ?
Thanks
I see no reason in using "display:block". I changed "left" parameter to "width". In my case this solution works great for bootstrap 2.3.2 buttons.
Comment out line 39
//display: 'block',
change line 44 to:
progressIndicatorHTML = '<div class="holdButtonProgress" style="height: 100%; width: 0; position: absolute; top: 0; left: 0%; background-color:' + this.settings.progressIndicatorColor + '; opacity:' + this.settings.progressIndicatorOpacity + ';"></div>';
change line 54 to
$(_this.element).find(".holdButtonProgress").css("width", ((decaCounter / _this.settings.holdTime) * 100) + "%");
change line 73 to
$(".holdButtonProgress").css("width", "0");