Hot!Ajax

  • Increase font size
  • Default font size
  • Decrease font size
  • default color
  • black color

Gsearch

Google
Home arrow jQuery arrow Photos | Other plugins arrow Confirm inplace( jQuery)
Confirm inplace( jQuery)
User Rating: / 10
PoorBest 
Sunday, 04 November 2007

这个插件能够在你你行动时给出确认信息。

原文: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:

<p>// The action.

 $('a').click(function() {

alert('click');

return false;

})</p>
<p>// The most simple use.

 $('a').confirm();</p>
 

预览1:



例2:

<p>// The action.

 $('input[type=button]').click(function() {

$(this).remove();

});</p>
<p>$('input[type=button]').confirm({

 msg:'Do you really want to delete this button?',

 timeout:3000

 });</p>
 
 

预览2:


例3:

<p>// The action.

 $('span').mouseover(function() {

$(this).html('Here is the offer');

});</p>
<p>$('span').confirm({

 msg:'See my interesting offer?',

 stopAfter:'ok',

 eventType:'mouseover',

 timeout:3000,

 buttons: {

 ok:'Sure',

 cancel:'No thanks',

 separator:'  '

 }

 });</p>
 

预览3:


例4:

<p>$('a').confirm({

timeout:3000,

dialogShow:'fadeIn',

dialogSpeed:'slow',

buttons: {

wrapper:'<button></button>',

separator:'  '

} 

});</p>
 

预览4:


源文件下载:http://www.hotajax.org/download/jquery/jQuery Confirm Plugin.zip

Comments (0)add comment

Write comment

busy
 
< Prev   Next >

Login






Lost Password?
No account yet? Register