The general idea is to make a site that looks like windows enviroment, so I have add two icons for example and when someone click on them, takes two different dialog boxes.
In to my site's index page I have add this inside head tags:
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css"
/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
<!-- JQUERY DIALOG SCRIPT -->
<script>
var $JQ_ = jQuery.noConflict();
$JQ_(function () {
$JQ_("#rl_module_dialog").dialog({
autoOpen: false,
width: 'auto',
resizable: false,
show: {
effect: "fade",
duration: 250
},
hide: {
effect: "fade",
duration: 250
}
});
$JQ_("#opener").click(function () {
$JQ_("#rl_module_dialog").dialog("open");
});
});
</script>
I also have two separated php files that are icluded into my index page and they contain this...
First:
<div id="rl_module_dialog" class="rl_module_dialog" title=""><?php include '**/**/something.php'; ?></div>
<div class="nm_icon" id="opener"><div class="icon"> </div></div>
Second
<div id="rl_module_dialog" class="rl_module_dialog" title=""><?php include '**/**/something_else.php'; ?></div>
<div class="vath_icon" id="opener"><div class="icon"> </div></div>
If I don't include the second one, dialog works fine. If I place them both, none is working! There is any way to use my jquery dialog script for more than one dialog in same page?