Jquery Msgbox Example - Jquery

What are the jquery msgbox types?

Snippet Code

Rate this page :
  [ 0 votes]

jQuery.msgbox code which allows to display the alert message on the web pages through dialog box. Simple code to create popup message is given below.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script src='http://raw.githack.com/composite/jQuery.MsgBox/master/jquery.msgbox.min.js'></script> <script> $(document).ready(function(){ $('button').click(function(){ switch(this.value){ case 'A':alert('This is browser default alert.');break; case 'B':$.alert('This is jQuery MsgBox alert.');break; case 'C':$.confirm('Would you like to test?',function(b){$.alert('You clicked '+(b?'OK':'Cancel'));});break; case 'D':$.prompt("What's your name?",function(s){$.alert('Your name is '+s);});break; case 'E':alert(prompt('Is browser prompt is usefull?','Yes'));break; } }); }); </script> <button type="button" value="A">Browser alert</button> <button type="button" value="B">$.msgbox alert</button> <button type="button" value="C">$.msgbox confirm</button> <button type="button" value="D">$.msgbox prompt</button> <button type="button" value="E">Browser prompt</button>


Ask Questions

Ask Question