MediaWiki:Common.js: Difference between revisions

From Hidden Palace
Jump to navigation Jump to search
m (Add qtip2)
m (Change qtip style)
Line 19: Line 19:


     });
     });
     $('[title!=""]').qtip();
     $('[title!=""]').qtip({
      style: {
          classes: 'qtip-tipsy'
      }
    });
});
});

Revision as of 14:03, March 28, 2016

$(document).ready(function(){
    $('span.hover-link').hover(function(e){
        var classes = $(this).attr("class").split(/\s+/);

        for (var i=0; i<classes.length; i++)
        {
            if (classes[i].indexOf("link-") != -1)
            {
                if (e.type == "mouseenter")
                {
                    $("span."+classes[i]).addClass("hover");
                }
                else if (e.type == "mouseleave")
                {
                    $("span."+classes[i]).removeClass("hover");
                }
            }
        }

    });
    $('[title!=""]').qtip({
      style: {
          classes: 'qtip-tipsy'
      }
    });
});