如何解決這個選擇器「div」,它會在jQuery UI對話框之上,並且它可以這樣做?什麼可能是最好的解決方案?與「farbtastic」顏色選擇器的jquery ui對話框
這裏是我想看到的內容: 1 http://img6.imageshack.us/img6/4866/74030613.png
HTML:
<div id="settingsDialogWindow" title="Settings" style="display:none;">
<label for="color">Color:</label>
<input type="text" id="color" name="color" value="#123456" maxlength="7" />
<div id="picker" style="position: absolute;
left: 50px;
border: 1px solid #aaa;
background-color: #fff;
-webkit-border-radius: 4px !important;
border-radius: 4px !important;
z-index: 99999999;"></div>
</div>
JS:
$(function() {
$("#settingsDialogWindow").dialog({
modal: true,
draggable: true,
height: 'auto',
width: 300,
minWidth: 300,
minHeight: 60,
resizable: false,
position: { at: "center middle" }
});
$('#picker').farbtastic('#color');
$("#color").focus(function() {
$("#picker").show();
});
$("#color").focusout(function() {
$("#picker").hide();
});
});
抱歉,但是......你想要什麼?你希望它是可移動的,但在對話框之外? – 2013-02-28 18:22:19
我想要那個顏色選擇器會在jQuery UI之上,現在它僅僅是它的一部分和滾動條apears。 – user007 2013-02-28 18:25:08
...對我來說,它在對話框中,沒錯。 (因爲它應該是,如果你想在外面,給它一個絕對的位置(或者至少是一個相對的左邊:-50px;或者其他的東西),但是不存在滾動條 – 2013-02-28 18:59:11