Widget:costumeSwitcher: Difference between revisions
Jump to navigation
Jump to search
m Bugfix |
Trigger change for modswitcher on startup |
||
Line 1: | Line 1: | ||
<includeonly><script> | <includeonly><script> | ||
RLQ.push(function () { | |||
$(document).ready(function() { | |||
// Let's make sure the correct values are shown | |||
$('.modswitcher').change(); | |||
}); | |||
}); | |||
function swap_mod(element) { | function swap_mod(element) { | ||
var selectBox = $(element); | var selectBox = $(element); | ||
Line 86: | Line 93: | ||
</script> | </script> | ||
<div style="display:flex"> | <div style="display:flex"> | ||
<!--{if $moddable neq ''}--><select class="gf-droplist" style="padding-left: 2px;padding-right: 8px;margin-right: 2px;" autocomplete="off" onchange="swap_mod(this)"> | <!--{if $moddable neq ''}--><select class="gf-droplist modswitcher" style="padding-left: 2px;padding-right: 8px;margin-right: 2px;" autocomplete="off" onchange="swap_mod(this)"> | ||
<option value='<!--{$defaultstats|escape:'html'}-->'>BASE</option> | <option value='<!--{$defaultstats|escape:'html'}-->'>BASE</option> | ||
<option value='<!--{$mod1stats|escape:'html'}-->'>MOD1</option> | <option value='<!--{$mod1stats|escape:'html'}-->'>MOD1</option> |