Module:Tooltip: Difference between revisionsGive feedback
osrsw>Food company Created page with "local p = {} local yn = require('Module:Yesno') local hc = require('Module:Paramtest').has_content -- module access point for div p._div = function(args) local name = a..." |
m 4 revisions imported |
||
| (3 intermediate revisions by 2 users not shown) | |||
| Line 16: | Line 16: | ||
local arrowsize = tonumber(args.arrowsize) or 10 | local arrowsize = tonumber(args.arrowsize) or 10 | ||
local limitwidthbool = yn(args.limitwidth or 'yes', true) | local limitwidthbool = yn(args.limitwidth or 'yes', true) | ||
local style = args.style | local style = hc(args.style) and args.style or nil | ||
local div = mw.html.create('div') | local div = mw.html.create('div') | ||
| Line 36: | Line 36: | ||
['data-tooltip-limit-width'] = limitwidth, | ['data-tooltip-limit-width'] = limitwidth, | ||
} | } | ||
div :addClass('hidden js-tooltip-wrapper') | div :addClass('hidden js-tooltip-wrapper') | ||
:cssText(style) | |||
:css('display', 'none') | :css('display', 'none') | ||
:attr(attrs) | :attr(attrs) | ||