How can I open multiple dialog boxes in a single page?
How can I open multiple dialog boxes in a single page?
I am trying to open multiple dialog boxes in one page with an iframe inside to resemble a browser window.
I have an example here: http://jsfiddle.net/pxQ8j/770/
The first icon opens up when clicked as I want it to, however the second dialog doesn't and the div contents remain unhidden.
I am also curious how I can remove the double scroll bars that show when the dialog is being resized.
Thank you in advance!!
code:
For value of attributes in HTML you must use HTML attributes syntax is please change change
</div>
<br>
<br>
</div> iframe {
width: 100%;
height: 100%;
padding-right :0;
overflow: hidden;
}
.ui-dialog .ui-widget-header {
background: #D3D3D3;
border: 0;
color: black;
font-weight: normal;
font-family: Arial;
font-size: 12px;
margin: 1px 0;
}
.ui-dialog .ui-dialog-content {
overflow: auto;
position: relative;
padding: 0
margin: 0;
align-content: center;
height: auto;
width:auto;
}
.ui .dialog {
left: 0;
outline: 0 none;
padding: 0 !important;
position: absolute;
top: 0;
}
.ui .dialog ::-webkit-scrollbar { display: none; } $( "#gallery" ).dialog({
autoOpen: false,
width:'700px',
resizeable: 'true',
modal: false,
margin: '0',
padding: '0'
});
$( "#hats" ).dialog({
autoOpen: false,
width:'700px',
resizeable: 'true',
modal: false,
margin: '0',
padding: '0'
});
$( '.icon1' ).click(function() {
$( "#gallery" ).dialog( "open" );
});
$( '.icon2' ).click(function() {
$( "#hats" ).dialog( "open" );
});
2 Answers
2
"
, not “
"
“
name="value"
(HTML Attributes)name="value"
id= “hats”
to id="hats"
id= “hats”
id="hats"
$( "#gallery" ).dialog({
autoOpen: false,
width:'700px',
resizeable: 'true',
modal: false,
margin: '0',
padding: '0'
});
$( "#hats" ).dialog({
autoOpen: false,
width:'700px',
resizeable: 'true',
modal: false,
margin: '0',
padding: '0'
});
$( '.icon2' ).click(function() {
$( "#hats" ).dialog( "open" );
});
$( '.icon1' ).click(function() {
$( "#gallery" ).dialog( "open" );
});
iframe {
width: 100%;
height: 100%;
padding-right :0;
overflow: hidden;
}
.ui-dialog .ui-widget-header {
background: #D3D3D3;
border: 0;
color: black;
font-weight: normal;
font-family: Arial;
font-size: 12px;
margin: 1px 0;
}
.ui-dialog .ui-dialog-content {
overflow: auto;
position: relative;
padding: 0
margin: 0;
align-content: center;
height: auto;
width:auto;
}
.ui .dialog {
left: 0;
outline: 0 none;
padding: 0 !important;
position: absolute;
top: 0;
}
.ui .dialog ::-webkit-scrollbar { display: none; }https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js
https://code.jquery.com/ui/1.12.1/jquery-ui.min.js
</div>
<br>
<br>
</div>
id= “hats”
to id= "hats"
and change overflow: auto;
to overflow: hidden;
in .ui-dialog-content
id= “hats”
id= "hats"
overflow: auto;
overflow: hidden;
.ui-dialog-content
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Thank you so much!! I could not figure out what was wrong... I was typing this in notepad instead of a text editor. However, still trying to solve the scrollbar issue :/
– naomi
Jul 3 at 3:56