qTip2动态生成弹出对话框

<script type='text/javascript'
	src='${ctx}/scripts/fullcalendar/jquery.qtip.js'></script>
<link rel='stylesheet' type='text/css'
	href='${ctx}/scripts/fullcalendar/jquery.qtip.css' />
<style type="text/css">
#ui-tooltip-modal {
	max-width: 420px;
	-moz-box-shadow: 0 0 10px 1px rgba(0, 0, 0, .5);
	-webkit-box-shadow: 0 0 10px 1px rgba(0, 0, 0, .5);
	box-shadow: 0 0 10px 1px rgba(0, 0, 0, .5);
}

#ui-tooltip-modal .ui-tooltip-content {
	padding: 10px;
}
</style>
<script type="text/javascript">
	function showAttachment(tdId, divId) {
		$('#' + tdId).qtip({
			content : {
				//text: $('div:hidden'),
				text : $('#' + divId),
				title : {
					text : '附件',
					button : true
				}
			},
			position : {
				my : 'top center',
				//target: 'mouse',
				viewport : $(window), // Keep it on-screen at all times if possible
				effect : false,
				adjust : {
					x : 3,
					y : 3
				}
			},
			show : {
				event : 'click',
				solo : true
			// Only show one tooltip at a time
			},
			//hide: {fixed: true },
			hide : 'unfocus',
			style : 'ui-tooltip-shadow'
		});
	}
	(function() {

		// remove layerX and layerY

		var all = $.event.props,

		len = all.length,

		res = [];

		while (len--) {

			var el = all[len];

			if (el != 'layerX' && el != 'layerY')
				res.push(el);

		}

		$.event.props = res;

	}());
</script>


		<td id="td1${indexanalysis.id}"><a href="#none"
							οnclick="showAttachment('td1${indexanalysis.id}', 'div1${indexanalysis.id}' )">
								指标1</a>
							<div id="div1${indexanalysis.id}" style="display: none;">
								<c:if test="${not empty indexanalysis.attachmentSet1}">
									<c:forEach items="${indexanalysis.attachmentSet1}"
										var="attachment" varStatus="state">
										<c:if test="${attachment.tableId == indexanalysis.id }">
											<table class="noborder">
												<tr id="attachment">
													<td>${state.count}:</td>
													<td colspan="3"><a title="下载"
														href="${ctx}/servlet/annex?id=${attachment.id}">${attachment.upfileFileName}</a>
													</td>
												</tr>
											</table>
										</c:if>
									</c:forEach>
								</c:if>
								<c:if test="${empty indexanalysis.attachmentSet1}">
								暂无附件
								</c:if>
							</div></td>




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值