GithubHelp home page GithubHelp logo

mapuchila / imgliquid Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eads/imgliquid

0.0 2.0 0.0 526 KB

jQuery plugin to resize images to fit in a container.

Home Page: http://goo.gl/Wk8bU

License: MIT License

JavaScript 28.39% HTML 71.61%

imgliquid's Introduction

ScreenShot

imgLiquid v0.9.943 / 03-05-2013 #####A jQuery Plugin to resize images to fit in a container. Alejandro Emparan (karacas) / @krc_ale Dual licensed under the MIT and GPL licenses. ##  #Usage

####Include:

<script src="js/imgLiquid-min.js"></script>

####js:

$(document).ready(function() {
	$(".imgLiquidFill").imgLiquid();
});

####Html:

<div class="imgLiquidFill imgLiquid" style="width:300px; height:200px;">
	<img alt="Woody" src="Woody.jpg" />
</div>

  ####View in action: http://goo.gl/Wk8bU ####or play with it: http://jsfiddle.net/karacas/3CRx7/#base http://codepen.io/karacas/pen/nlugd ##  ###Features:

	- Uses CSS Background-size when is available. (new!)
    - Bootstrap compatible.
    - Lightweight: < 2.0KBs gzipped.
	- Fill / Crop.
    - Align.
	- Responsive.
	- Svg support.
	- CallBacks.
    - HTML5 data-* attributes.
	- All browsers (Incl. ie6).

  ###Options:


    >js
        fill: true,
        verticalAlign:      // 'center' //  'top'   //  'bottom' // '50%'  // '10%'
        horizontalAlign:    // 'center' //  'left'  //  'right'  // '50%'  // '10%'

        //CallBacks
        onStart:        function(){},
        onFinish:       function(){},
        onItemStart:    function(index, container, img){},
        onItemFinish:   function(index, container, img){}

    >hml5 data attr (overwrite js options)
        data-imgLiquid-fill="true"
        data-imgLiquid-horizontalAlign="center"
        data-imgLiquid-verticalAlign="50%"

imgliquid's People

Contributors

karacas avatar eads avatar iign avatar tiagoroldao avatar

Watchers

James Cloos avatar Godfrey A.Lifa avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.