TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Bring jQuery Dialog to Front
Raghavendra U
Jul 28
2016
Code
4.1
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
Hi, while using jquery modal dialog box sometimes we get an issue that dialog box goes back to the background. Then we can make some changes to resolve the issue. Try any of the following suggestions to resolve the issue.
make sure that jquery-ui.css file is added or not
<
link
rel
=
"stylesheet"
type
=
"text/css"
href
=
"css/jquery-ui.css"
>
or
add the jquery-ui.js file next to the jquery.js file
<
script
type
=
"text/javascript"
src
=
"js/jquery1.11.1-min.js"
>
</
script
>
<
script
type
=
"text/javascript"
src
=
"js/jquery-ui.js"
>
</
script
>
or
add the following style
<style type=
"text/css"
>
.ui-dialog{
z-index
:
103
;
}
.ui-widget-overlay{
z-index
:
102
;
}
</style>
or
add the following script
$(
"#mydialog"
).dialog({ modal:
true
, autoOpen:
false
,
open:
function
(event, ui) {
$(
'.ui-dialog'
).css(
'z-index'
, 103);
$(
'.ui-widget-overlay'
).css(
'z-index'
, 102);
}
});
jquery dialog
css
html
javascript