Show simple modal dialog using JQuery -
there simple following div:
<div id="dialogg"> hello, world! </div>
some css style:
#dialogg { display: none; }
and jquery code:
<script src="assets/js/jquery-1.9.1.min.js"></script> <script src="assets/js/jquery-ui-1.10.2.custom.js"></script> <script src="assets/js/jquery-ui-1.10.2.custom.min.js"></script> <script type="text/javascript"> $(function() { $('#dialogg').dialog({ autoopen: false; width: 400; }); $('#dialogg').dialog('open'); }); </script>
but see no dialogs! how can fix it? what's wrong?
update:
<head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>Исторический турнир</title> <link rel="stylesheet" type="text/css" href="assets/css/main-styles.css"> <link rel="stylesheet" type="text/css" href="assets/css/departments-page-styles.css"> <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" /> <script src="assets/js/jquery-1.9.1.min.js"></script> <script src="assets/js/jquery-ui-1.10.2.custom.min.js"></script> <script type="text/javascript"> $(function() { $('#dialogg').show(); $('#dialogg').dialog({ autoopen: false; width: 400; }); $('#dialogg').dialog('open'); }); </script> </head>
but code doesn't still work.
please try this:
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" /> <script src="http://code.jquery.com/jquery-1.9.1.js"></script> <script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>
and try: $("#dialogg").dialog();
<script> $(function() { $( "#dialogg").dialog(); }); </script>
see demo
Comments
Post a Comment