0
Я пытаюсь открыть диалог при нажатии кнопки ввода. Но это не открытие диалога, просто скрывающего текст. Может кто-нибудь объяснить, почему?Почему диалоговое окно JQuery не открывается?
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Dialog - Default functionality</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css">
</head>
<body>
<script>
$(document).keydown(function(mykey2){
if(mykey2.which == 13){
$("#dialog").dialog();
}
});
</script>
<div id="dialog" title="Basic dialog">
<p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>
</div>
</body>
</html>
Я не understang, что это неправильно.
попробуйте добавить 'HTTP:' 'перед //code..'s? –
Я думаю, что это проблема с версией, работает ** [Здесь] (http://jsfiddle.net/wjgahkLk/1/) **, но не с вашей версией ** [Здесь] (http://jsfiddle.net/ wjgahkLk/2 /) ** –
О да, это тоже верно –