|
 这个插件能够在你你行动时给出确认信息。
原文:http://nadiaspot.com/jquery/confirm/ 本文版权属于原作者。 未经本站允许不得转载! 文档: (element).confirm(options) | options | | Name | Type | Optional | Description | Default Value | | msg | String | Optional | Confirmation message | 'Are you sure?' | | stopAfter | string | Optional | Determines when the confirmation dialog will stop being promoted. Possible values ('never', 'ok', 'cancel', 'once') | 'never' | | wrapper | String | Optional | Dialog wrapper | '<span></span>' | | eventType | String | Optional | The event that triggers the confirmation | 'click' | | dialogShow | String | Optional | Dialog displaying effect | 'show' | | dialogSpeed | String | Optional | Dialog displaying speed | 'fast' | | timeout | Integer | Optional | Time in milliseconds to hide the confirmation dialog | 0 | | options.buttons | | ok | String | Optional | Ok caption | 'Yes' | | cancel | String | Optional | Cancel caption | 'No' | | wrapper | String | Optional | Button wrapper | '<a href="#"></a>' | | separator | String | Optional | Separator between buttons | '/' | | cls | String | Optional | Button class | undefined | 例1: // The action. $('a').click(function() { alert('click'); return false; }) // The most simple use. $('a').confirm(); 预览1: DEMO1 例2: // The action. $('input[type=button]').click(function() { $(this).remove(); }); $('input[type=button]').confirm({ msg:'Do you really want to delete this button?', timeout:3000 }); 预览2: DEMO2 例3: // The action. $('span').mouseover(function() { $(this).html('Here is the offer'); }); $('span').confirm({ msg:'See my interesting offer?', stopAfter:'ok', eventType:'mouseover', timeout:3000, buttons: { ok:'Sure', cancel:'No thanks', separator:' ' } }); 预览3: DEMO3 例4: $('a').confirm({ timeout:3000, dialogShow:'fadeIn', dialogSpeed:'slow', buttons: { wrapper:'<button></button>', separator:' ' } }); 预览4: DEMO4 源文件下载:http://www.hotajax.org/download/jquery/jQuery Confirm Plugin.zip
Newer news items:
Older news items:
|