- Overview
- Documents
jQThumb is a jquery plugin that create thumbnails from images proportionally and also an alternative for background-size in older browsers. It even works on IE6 from jQuery V1.3 and above.
Source: github.com
Jul 03, 2014 in Layout 3485 views
jQThumb is a jquery plugin that create thumbnails from images proportionally and also an alternative for background-size in older browsers. It even works on IE6 from jQuery V1.3 and above.
Source: github.com
1. INCLUDE JS FILES
<script src="../bower_components/jquery/jquery.js"></script> <script src="jqthumb.js"></script>
2. HTML
<img id="imageToTest" class="example1" src="picture.jpg" />
3. JAVASCRIPT
$(function(){ $('.example1').jqthumb({ classname : 'jqthumb', width : 100, height : 100, position : { top: '50%', left: '50%' }, showoncomplete : false, before : function(oriImage){}, after : function(imgObj){ $(imgObj) .css('opacity', 0) .show() .animate({ opacity: 1 }, 2000); } }); });
4. OPTIONS
classname : 'jqthumb', width : 100, height : 100, position : { top: '50%', left: '50%' }, source : 'src', showoncomplete : true, before : function(){}, after : function(){}, done : function(){}
Tagged with:
jqthumb
thumbnails
images
images proportionally
background-size
create thumbnails
Related Articles