I have two DIV elements and they contain icon images as background. When I click on them I get a dialog window for each one. What I want to do when each dialog window opens, is to get the image of DIV as icon on dialog's title. Any idea? Here is my code...
HTML
<div id="opener_1"></div>
<div id="dialog_1" title="FIREFOX">This is a Firefox window...</div>
<div id="opener_2"></div>
<div id="dialog_2" title="CHROME">This is a Chrome window...</div>
JQUERY
var $JQ_ = jQuery.noConflict();
$JQ_(function () {
$JQ_('[id^="dialog"]').dialog({
autoOpen: false,
width: 'auto',
height: 'auto',
resizable: false,
show: {
effect: "fade",
duration: 250
},
hide: {
effect: "fade",
duration: 250
}
});
$JQ_("#opener_1").click(function () {
$JQ_("#dialog_1").dialog("open");
});
$JQ_("#opener_2").click(function () {
$JQ_("#dialog_2").dialog("open");
});
});
There is also a jsfiddle code here...