Dongzhuoer (Talk | contribs) |
Dongzhuoer (Talk | contribs) |
||
Line 1: | Line 1: | ||
− | + | var rem = Number($('html').css('font-size').replace('px', '')); | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
function log(value) { console.log(value); } | function log(value) { console.log(value); } | ||
function particles() { $('#particles-js').toggle(); } | function particles() { $('#particles-js').toggle(); } | ||
Line 26: | Line 10: | ||
) | ) | ||
} | } | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 15:59, 19 October 2016
var rem = Number($('html').css('font-size').replace('px', ));
function log(value) { console.log(value); } function particles() { $('#particles-js').toggle(); } function adjust_figure() { $('figure').each( function (index, value) { var max_width = $(value).find('span').width() / rem * 1.2 + 'rem'; $(value).css('max-width', max_width); } ) }