Giter VIP home page Giter VIP logo

basicfit's Introduction

[Deprecated] basicFit

Turn elements on your site into a responsive unified grid.

Context Screenshot

Installation

bower install basicFit

Requirements

basicFit requires jQuery >= 2.1.0

How to use

####1. Include the files

<script async type="text/javascript" src="bower_components/jQuery/dist/jquery.min.js"></script>
<script async type="text/javascript" src="bower_components/basicFit/dist/basicFit.min.js"></script>

####2. Build a simple structure

<div id="content">
	<div class="element"></div>
	<div class="element"></div>
	<div class="element"></div>
	<div class="element"></div>
</div>

####3. Set a margin and max-min-width

#content {
	display: inline-block;
	margin: 0 0 20px 0;
}
.element {
	float: left;
	margin: 20px 0 0 20px;
	min-width: 300px;
	max-width: 500px;
	background-color: #000;
}

####4. Initialize basicFit

basicFit.init '#content', '.element'

####5. Refresh after adding a new element

$('#content').append element
basicFit.refresh()

basicfit's People

Contributors

electerious avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.