This is my javascript function am calling on a page:
<script>
$.fn.tabbedDialog = function () {
this.tabs();
this.dialog({ 'minWidth': 300, 'minHeight': 300, 'draggable': true, 'autoOpen': false, 'resizable': false, });
var $dialog = $(this).closest('.ui-dialog');
this.find('.ui-icon-closethick').append($('.ui-dialog-titlebar-close')).css('position', 'static');
$dialog.find('.ui-draggable-handle').append($('.ui-tabs-nav').removeClass().addClass('ui-tabs-nav')).addClass('ui-tabs');
$dialog.find('.ui-dialog-title').remove();
}
$('#xxx').tabbedDialog();
$('a#show').click(function () {
if ($('#xxx').dialog("isOpen")) {
$('#xxx').dialog('close');
}
else {
$('#xxx').dialog('open');
}
});
</script>
jQuery dialog is conflicting with this script that is global to my template at this point when I try to open the dialog box and this is the script defined in the other javascript file attached to my template:
this.$dialog.on('mousedown.dismiss.bs.modal', function () {
that.$element.one('mouseup.dismiss.bs.modal', function (e) {
if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true
})
})
I have tried commenting the line of code disturbing the dialog but it distorts the other parts of my project. please how can I resolve this dialog conflict Kindly assist!
$.fnmethodsthis.$dialogandjQuery.fn.dialoghas nothing to do with each other, you'd have to actually overwrite the prototyped method on the jQuery instance. You're sure the issue isn't just that you didn't load jQuery UI.