我正在搜索一个Jquery函数,它应该获取图像的URL,并且在Jira的创建问题屏幕中检查单选按钮的特定选项时应该出现弹出图像。
(function($) {
$('#customfield_12802-1').change(function() {
alert('Image pop should come, instead of the alert box');
});
$('#customfield_12802-2').change(function() {
alert('Image pop should come, instead of the alert box');
});
})(AJS.$);
答案 0 :(得分:0)
我不认为有一个简单的单行jQuery解决方案,但你可以使用插件,Dialog | jQuery UI
来做到这一点:
<强> HTML:强>
<select id = "myList">
<option value = "1">one</option>
<option value = "2">two</option>
<option value = "3">three</option>
<option value = "4">four</option>
</select>
<div id="dialog"></div>
<强> JS:强>
$(function() {
$('#dialog').html('<img src="/url/to/myImage.png" />')
.dialog()
.parent()
.hide();
});
$('#myList').change(function() {
$( "#dialog").dialog().parent().show();
});