123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- (function($){
- $(function(){
- /**
- * [被ban英雄下拉菜单]
- * @return {[type]} [description]
- */
- $("body").delegate('.user-info', 'mouseenter', function(event) {
- $('.user-img').show();
- event.preventDefault();
- });
- $("body").delegate( '.user-info', 'mouseleave', function(event) {
- $('.user-img').hide();
- event.preventDefault();
- });
- /*保证当前浮层置于最前*/
- $("body").delegate( '.team-name', 'mouseenter', function(event) {
- $(this).addClass('team-name--current');
- event.preventDefault();
- });
- $("body").delegate( '.team-name', 'mouseleave', function(event) {
- $(this).removeClass('team-name--current');
- });
- /*出装数据切换代码*/
- $("body").delegate('.sel-tab-link a','click', function(event) {
- var ocass = $(this).data('type');
- if( ocass == "early-data" ){
- $(".zj-table .col4").addClass('datalist');
- }
- else{
- $(".zj-table .col4").removeClass('datalist');
- }
- $('.sel-tab-link a').removeClass('link-on');
- $(this).addClass('link-on');
- $('.' + ocass).show().siblings('ul').hide();
- event.preventDefault();
- });
- /*隐藏显示装备栏目一件应用按钮*/
- $("body").delegate('.col4','mouseenter', function(event) {
- $(this).find(".link").css("visibility","visible");
- event.preventDefault();
- });
- $("body").delegate('.col4', 'mouseleave', function(event) {
- $(this).find(".link").css("visibility","hidden");
- event.preventDefault();
- });
- })
- /**
- * [tipsWin 盒子对象]
- * @type {[type]}
- */
- window.tipsWin = {};
- tipsWin.tooltips = {};/*浮层对象*/
- /**
- * [html 填写弹窗内mod-tips-content代码]
- * @param {[type]} str [代码结构字符串]
- * @return {[type]} [description]
- */
- tipsWin.tooltips.html = function(str){
- $( '#mod-tips-s1 .mod-tips-content' ).html(str);
- }
- /*关闭浮层*/
- tipsWin.tooltips.close = function(){
- tipsWin.tooltips.status = 0 ;
- $( '#mod-tips-s1' ).hide();
- }
- /**
- * [init 浮层初始化]
- * @return {[type]} [description]
- */
- tipsWin.tooltips.init = function(){
- if( tipsWin.tooltips.initSign == 1 ){
- return;
- }
- tipsWin.tooltips.initSign = 1 ;
- var layerHover = false;
- $("body").delegate('.zj-table .avatar', 'mouseenter', function(event) {
- var that= $(this);
- clearTimeout(window.toolTipTimer);
- clearTimeout(window.toolTipoutTimer);
- toolTipTimer = setTimeout(function(){
- tipsWin.tooltips.open(that);
- },150)
- });
- $("body").delegate('.zj-table .avatar', 'mouseleave', function(event) {
- event.preventDefault();
- clearTimeout(window.toolTipTimer);
- clearTimeout(window.toolTipoutTimer);
-
- toolTipoutTimer = setTimeout(function() {
- if(!layerHover) tipsWin.tooltips.close();
- }, 200);
- $("body").delegate('#mod-tips-s1', 'mouseenter', function(event) {
- event.preventDefault();
- layerHover = true;
- });
- $("body").delegate('#mod-tips-s1', 'mouseleave', function(event) {
- event.preventDefault();
- layerHover = false;
- clearTimeout(window.toolTipoutTimer);
- toolTipoutTimer = setTimeout(function() {
- tipsWin.tooltips.close();
- }, 200);
- });
- });
- }
- })(jQuery)
|