一种特殊的确认提示效果:Press and Hold Button

jopen 11年前

Press and Hold button 是一款用来替代‘你确定吗’对话框的 jQuery 插件,它会创建一个按钮,需要用户持续按住一段时间才会生效。用户可以设置提示进度条的透明度,颜色,内容和延迟时间。

可配置选项

  • holdTime:
    The amount of time the user needs to hold the mouse button.
  • progressIndicatorRemoveDelay:
    Sets a delay on removing the progress indicator. Might be a useful hint to help teach the user how to use the control.
  • progressIndicatorColor:
    Color of the progress bar.
  • progressIndicatorOpacity:
    Opacity of the progress bar.

事件

  • start.pressAndHold:
    The control has started the holding timer.
  • complete.pressAndHold
    The control has completed holding for the entirity of the hold time.
  • end.pressAndHold
    The control has completed holding regarless of duration.

示例

http://naptown.com/pressAndHold/

一种特殊的确认提示效果:Press and Hold Button

项目主页:http://www.open-open.com/lib/view/home/1389318114352