pressAndHold icon indicating copy to clipboard operation
pressAndHold copied to clipboard

usage on form elements

Open pcout opened this issue 11 years ago • 3 comments

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/

pcout avatar Jan 05 '14 02:01 pcout

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.

santhony7 avatar Jan 05 '14 23:01 santhony7

Hi,

Any news on this ?

Thanks

pcout avatar Jan 15 '14 16:01 pcout

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");

D-Ogi avatar Jan 30 '14 07:01 D-Ogi