国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網(wǎng)站 > WEB開發(fā) > 正文

jQuery提示插件 qTip簡單使用

2024-04-27 15:04:49
字體:
來源:轉載
供稿:網(wǎng)友

簡介:

qtip是Jquery的一款提示插件,使用比較簡單,在Activiti工作流的流程追溯頁面使用到qtip插件。

使用步驟:

1、 下載qtip插件

http://qtip2.com/download

2、 下載的插件目錄

3、 一般情況下,將jquery.qtip.min.CSS和jquery.qtip.min.js放入項目中使用即可

4、 在頁面引入css和js

<link rel="stylesheet" href="${appName}/res/jquery.qtip.min.css"><script type="text/javascript" src="${appName}/res/jquery.qtip.min.js"></script>5、 需要加qtip提示的代碼片段(圖片映射代碼)
<map id="imgHref" name="imgHref"><area id="usertask1" name="部門經(jīng)理【審批】" type="userTask" shape="rect" coords="(97.0,167.0,233.0,222.0)" xposition="97.0px" yposition="167.0px" target="_blank" data-hasqtip="0" aria-describedby="qtip-0"><area id="exclusivegateway1" name="Exclusive Gateway" type="exclusiveGateway" shape="rect" coords="(144.0,249.0,184.0,289.0)" xposition="144.0px" yposition="249.0px" target="_blank"><area id="usertask2" name="人事【審批】" type="userTask" shape="rect" coords="(112.0,311.0,217.0,366.0)" xposition="112.0px" yposition="311.0px" target="_blank" data-hasqtip="1"><area id="exclusivegateway2" name="Exclusive Gateway" type="exclusiveGateway" shape="rect" coords="(144.0,391.0,184.0,431.0)" xposition="144.0px" yposition="391.0px" target="_blank"><area id="usertask3" name="經(jīng)理聯(lián)合【審批】" type="userTask" shape="rect" coords="(96.0,465.0,234.0,520.0)" xposition="96.0px" yposition="465.0px" target="_blank" data-hasqtip="2"><area id="parallelgateway1_start" name="Parallel Gateway" type="parallelGateway" shape="rect" coords="(142.0,655.0,182.0,695.0)" xposition="142.0px" yposition="655.0px" target="_blank"><area id="usertask5" name="人事【報備】" type="userTask" shape="rect" coords="(5.0,711.0,110.0,766.0)" xposition="5.0px" yposition="711.0px" target="_blank" data-hasqtip="3"><area id="usertask6" name="部門【報備】" type="userTask" shape="rect" coords="(214.0,711.0,319.0,766.0)" xposition="214.0px" yposition="711.0px" target="_blank" data-hasqtip="4"><area id="usertask7" name="銷假" type="userTask" shape="rect" coords="(109.0,855.0,214.0,910.0)" xposition="109.0px" yposition="855.0px" target="_blank" data-hasqtip="5"><area id="exclusivegateway3" name="Exclusive Gateway" type="exclusiveGateway" shape="rect" coords="(144.0,575.0,184.0,615.0)" xposition="144.0px" yposition="575.0px" target="_blank"><area id="usertask8" name="提交申請" type="userTask" shape="rect" coords="(112.0,75.0,217.0,130.0)" xposition="112.0px" yposition="75.0px" target="_blank" data-hasqtip="6"><area id="parallelgateway1_end" name="Parallel Gateway" type="parallelGateway" shape="rect" coords="(144.0,775.0,184.0,815.0)" xposition="144.0px" yposition="775.0px" target="_blank"><area id="startevent1" name="Start" type="startEvent" shape="rect" coords="(147.0,5.0,182.0,40.0)" xposition="147.0px" yposition="5.0px" target="_blank"><area id="endevent1" name="End" type="endEvent" shape="rect" coords="(144.0,955.0,179.0,990.0)" xposition="144.0px" yposition="955.0px" target="_blank"></map>6、qtip在jquery內的使用
$(function(){	    $("area[type='userTask']").each(function (){	    	var nodeId=$(this).attr('id');	    	var PRocessInstanceId="${proc_inst_id_}";	    	$(this).qtip({	  			content:{	  				text:function (event,api){	  					$.Ajax({	  						url:'${appName}/workflow/workflowProcess/getActivityApprovalInfo.ajax',	  						data:{proc_inst_id_:processInstanceId,task_def_key_:nodeId}	  					})	  					.then(function(content) {	  						if(content.length>0){		  						var content_text="<table  border='1' width='260px;' height='50px;' style='text-align: center;font-size:12px;'>";		  						for(var i=0;i<content.length;i++){		  							content_text+="<tr><td width='115px;'>審批人:</td><td>"+content[i].assignee_+"</td></tr><tr><td>審批時間:</td><td>"+content[i].end_time_Disp+"</td></tr>"		  										  +"<tr><td>審批意見:</td><td>"+content[i].comment_message+"</td></tr>";		  						}		  						content_text+="</table>";		                        api.set('content.text', content_text);	  						}else{		                        api.set('content.text', "<div>暫無審批記錄</div>");	  						}	                    }, function(xhr, status, error) {	                        api.set('content.text', status + ': ' + error);	                    });	  					return '正在加載...';	  				}	  			},	  			position:{	  				target: 'mouse',	                adjust: { mouse: false }	  			}		    });	    });    });7、實現(xiàn)的效果


發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 郧西县| 新宁县| 临桂县| 府谷县| 南漳县| 乐业县| 阿瓦提县| 贡觉县| 治多县| 界首市| 鄂托克前旗| 铅山县| 湟中县| 思南县| 泗阳县| 乌鲁木齐市| 日照市| 印江| 南靖县| 木里| 乐都县| 临漳县| 满洲里市| 玛纳斯县| 金堂县| 九龙县| 禹城市| 文水县| 宜兰市| 永福县| 桐庐县| 贵南县| 曲麻莱县| 随州市| 富川| 湖口县| 黎川县| 青阳县| 广德县| 陈巴尔虎旗| 万年县|