Ero sivun ”Widget:Fullscreen” versioiden välillä
Järvi-meriwikistä
Rivi 1: | Rivi 1: | ||
<includeonly> | <includeonly> | ||
− | <div id="<!--{$id|default:Fullscreen|escape:'html'}-->_container"></div> | + | <div id="<!--{$id|default:Fullscreen|escape:'html'}-->_container" style="float: right;"></div> |
<script type="text/javascript"> | <script type="text/javascript"> | ||
(function() { | (function() { | ||
− | |||
− | |||
function <!--{$id|default:Fullscreen|escape:'html'}-->_jQueryTest() { | function <!--{$id|default:Fullscreen|escape:'html'}-->_jQueryTest() { | ||
if ( typeof window.jQuery == 'undefined' ) { | if ( typeof window.jQuery == 'undefined' ) { | ||
setTimeout( function(){ <!--{$id|default:Fullscreen|escape:'html'}-->_jQueryTest() }, 300); | setTimeout( function(){ <!--{$id|default:Fullscreen|escape:'html'}-->_jQueryTest() }, 300); | ||
} else { | } else { | ||
− | |||
if ( jQuery( "#<!--{$id|default:Fullscreen|escape:'html'}-->_container" ).length > 0 ) { | if ( jQuery( "#<!--{$id|default:Fullscreen|escape:'html'}-->_container" ).length > 0 ) { | ||
<!--{$id|default:Fullscreen|escape:'html'}-->_func(); | <!--{$id|default:Fullscreen|escape:'html'}-->_func(); | ||
Rivi 22: | Rivi 19: | ||
function <!--{$id|default:Fullscreen|escape:'html'}-->_func() { | function <!--{$id|default:Fullscreen|escape:'html'}-->_func() { | ||
− | + | var output = '<div class="fullscreen-button" style="margin-left: 10px; float: right; border-radius: 50%;"><button title="fullscreen" style="width: 24px; height: 24px; padding: 0; margin: 0; color: #1B599B; background: none; border: none;"><i class="fas fa-expand"></i></button></div>'; | |
− | |||
− | var output = '<div class=" | ||
− | |||
− | |||
− | |||
jQuery( "#<!--{$id|default:Fullscreen|escape:'html'}-->_container" ).html( output ); | jQuery( "#<!--{$id|default:Fullscreen|escape:'html'}-->_container" ).html( output ); |