Sha256: 3903112b0c78285f16c042de5aaa8b1cf4e1ae39b0cbb67100dfabb3beee4f04

Contents?: true

Size: 659 Bytes

Versions: 6

Compression:

Stored size: 659 Bytes

Contents

// resize.js: Shining plugin for resizing the stage's base font size depending on available screen dimensions

$(window).resize(function() {
  $.throttle(function() {
    var width = $(window).width();
    if (width >= 640 && width < 800) {
      $('#stage').css({fontSize: '100%'});    
    } else if (width >= 800 && width < 1024) {
      $('#stage').css({fontSize: '130%'});
    } else if (width >= 1024 && width < 800) {
      $('#stage').css({fontSize: '160%'});
    } else if (width >= 1280 & width < 1024) {
      $('#stage').css({fontSize: '180%'});
    } else if (width > 1280) {
      $('#stage').css({fontSize: '200%'});
    }       
  }, 500);
})

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
shining-1.3.7 lib/plugins/resize.js
shining-1.3.6 lib/plugins/resize.js
shining-1.3.5 lib/plugins/resize.js
shining-1.3.4 lib/plugins/resize.js
shining-1.3.3 lib/plugins/resize.js
shining-1.3.2 lib/plugins/resize.js