javascript - What has the best cross-browser support, JQuery dialogs or HTML5 modal dialogs? -


i trying create online app needs have multiple items of content open @ 1 time. have looked @ jquery dialogs , html5 modal dialogs. of these should choose best cross-browser support? there different implementation work better?

sounds maybe jquery ui's dialogs you're looking for? set aside html in container (such div) , render dialog box. link: https://jqueryui.com/dialog/

to "create" dialog, you'll need create dialog container whenever need visible. such as:

 <script type="text/javascript">      $('#mypopup').dialog();   </script> 

that page has example of how started. more detail can them (such adding buttons), check out full api page: link: http://api.jqueryui.com/dialog/

even better - can use custom themes or variety of premade themes jquery ui. check out themeroller (http://jqueryui.com/themeroller/) started.

finally, you'll need have both jquery (https://jquery.com) , jquery ui (https://jqueryui.com/) included in both of projects work. i'd recommend reading on basic jquery/jquery ui tutorials if new them.

edit:

here example on jsfiddle example of page like. fiddle: http://jsfiddle.net/ulgra/

code:

<html lang="en"> <head>     <title>test</title>     <script type="text/javascript" src="http://code.jquery.com/jquery-2.1.0.js"></script>     <script type="text/javascript" src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>     <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.4/themes/humanity/jquery-ui.css">     <script type="text/javascript">         // when document has loaded..         $(document).ready(function() {             // turn id dialog             $('#popuptest').dialog();             // also, turn input type="button" jquery ui button             // consistency             $('#btnrandom').button();         });     </script> </head> <body> <div id="popuptest" title="stackoverflow example">     <p>hello, world.</p>     <p>care cup of tea?</p>     <input type="text" value="" placeholder="sample input form">     <input id="btnrandom" type="button" value="this button nothing... yet"> </div> </body> </html> 

Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -