I am trying to show a jQuery modal popup in my custom dnn module and for it I used below code which works fine.
<div id="dialog-form" title="Notices">
<div>
My Notice 1
</div>
</div>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.0/themes/base/jquery-ui.css" />
<script type="text/javascript">
$(document).ready(function () {
$("#dialog-form").dialog({
modal: true,
buttons: {
Close: function () {
$(this).dialog("close");
}
}
});
});
</script>
My concern is that in above code I have referred to jQuery UI file directly using link tag and I know that DNN ships with jquery UI files itself. So there must be some way to avoid referencing UI css file directly and using what dnn already comes with.
I have tried using below lines in my modules code behind but none of them worked for me
DotNetNuke.Framework.jQuery.RequestUIRegistration();
JavaScript.RequestRegistration(CommonJs.jQueryUI); //obsolete in DNN7.2
I also tried method mentioned at below link http://www.ifinity.com.au/Blog/EntryId/121/Using-jQuery-UI-with-DotNetNuke-5-and-6-in-the-same-module