I'm new to jquery and I wanted to add a dialog to my page when a function is called. Whenever I call this function from the console, the dialog shows up but with the error below. What did it mean and how to solve it ?
Uncaught TypeError: a(...).parents(...).andSelf is not a function
at d (jquery-ui.min.js:5)
at c (jquery-ui.min.js:5)
at Array.tabbable (jquery-ui.min.js:5)
at jquery.min.js:2
at r (jquery.min.js:2)
at se.select (jquery.min.js:2)
at Function.se [as find] (jquery.min.js:2)
at k.fn.init.find (jquery.min.js:2)
at a.<computed>.<computed>.open (jquery-ui.min.js:5)
at a.<computed>.<computed>._init (jquery-ui.min.js:5)
I'v used these jquery libraries :
<script src="../vendor/jquery/jquery.min.js"></script> //Given with my bootstrap theme
<script src="../vendor/jquery-easing/jquery.easing.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
And the function I called is this one :
function afficherPopupErreur() {
$('body').append('<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>');
$( "#dialog" ).dialog();
}
I know that this append is quite weird but it was just to try the dialog.