1/** 2 * jQuery.fullBg 3 * Version 1.0 4 * Copyright (c) 2010 c.bavota - http://bavotasan.com 5 * Dual licensed under MIT and GPL. 6 * Date: 02/23/2010 7**/ 8(function($) { 9 $.fn.fullBg = function(){ 10 var bgImg = $(this); 11 12 bgImg.addClass('fullBg'); 13 14 function resizeImg() { 15 var imgwidth = bgImg.width(); 16 var imgheight = bgImg.height(); 17 18 var winwidth = $(window).width(); 19 var winheight = $(window).height(); 20 21 var widthratio = winwidth/imgwidth; 22 var heightratio = winheight/imgheight; 23 24 var widthdiff = heightratio*imgwidth; 25 var heightdiff = widthratio*imgheight; 26 27 if(heightdiff>winheight) { 28 bgImg.css({ 29 width: winwidth+'px', 30 height: heightdiff+'px' 31 }); 32 } else { 33 bgImg.css({ 34 width: widthdiff+'px', 35 height: winheight+'px' 36 }); 37 } 38 } 39 resizeImg(); 40 $(window).resize(function() { 41 resizeImg(); 42 }); 43 }; 44})(jQuery)
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.