Advertisement
rAthus

Intégration de jQuery MsgBox et fonction alert()

Oct 2nd, 2013
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.56 KB | None | 0 0
  1. Documentation : http://rathur.fr/jQuery/MsgBox/
  2.  
  3. Code pour intégrer le système au site, avec en bonus redéfinition de la fonction alert() :
  4.  
  5. <!-- jQuery MsgBox -->
  6. <script type="text/javascript" src="js/jquery.msgbox.min.js"></script>
  7. <link href="css/jquery.msgbox.css" rel="stylesheet" type="text/css" />
  8. <script>
  9.     /** Redéfinition de la fonction alert() **/
  10.     $(document).ready(function()
  11.     {
  12.         alert = function(message,type)
  13.         {
  14.             if (typeof(type)=='undefined')
  15.                 $.msgbox(message+'');
  16.             else
  17.                 $.msgbox(message+'',{type:type});
  18.         }
  19.     });
  20. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement