MediaWiki:Common.js: Difference between revisions

From Hidden Palace
Jump to navigation Jump to search
m (Change qtip style)
mNo edit summary
Line 19: Line 19:


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

Revision as of 14:05, 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");
                }
            }
        }

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