I cannot get a simple dialog box working in JQuery when I also include JQuery mobile:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>jQuery UI Dialog - Default functionality</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<script src="https://code.jquery.com/jquery-2.1.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
<script>
$( function() {
$( "#dialog" ).dialog();
} );
</script>
</head>
<body style="background-color: #888">
<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>
I have looked at these previous questions which do not seem to help:
What am I doing wrong?
After reading the post Using multiple versions of jquery ui from RedNao i was able to create a simple proof of concept.
The idea is to swap two instances of jQuery but, you are warned, i haven't fully tested against heavy usage in code.
After that, i'm hiding the UI dialog markup to jQuery Mobile by using
data-enhance="false"
.Then, it looks like this:
Plunker: https://plnkr.co/edit/oOg6cKEuMFXVrMn3ntCb?p=preview