bricklayer
Advanced tools
Comparing version 0.3.1 to 0.3.2
{ | ||
"name": "bricklayer", | ||
"version": "0.3.2", | ||
"authors": [ | ||
@@ -25,4 +26,3 @@ "Adem İlter <ademilter@gmail.com>", | ||
"assets" | ||
], | ||
"version": "0.3.1" | ||
] | ||
} |
{ | ||
"name": "bricklayer", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "Lightweight and strong Masonry alternative", | ||
@@ -5,0 +5,0 @@ "main": "dist/bricklayer-node.js", |
@@ -57,2 +57,3 @@ <img src="https://raw.githubusercontent.com/ademilter/bricklayer/master/logo.png" width="416"> | ||
| --------- | -------------------- | ---------- | | ||
| **jQuery** | [Built-in](https://github.com/ademilter/bricklayer/blob/master/README.md#built-in-jquery-support) | [http://codepen.io/f/pen/zqLJNa](http://codepen.io/f/pen/zqLJNa) | | ||
| **Angular.js** | [JohnnyTheTank/angular-bricklayer](https://github.com/JohnnyTheTank/angular-bricklayer) | [http://plnkr.co/edit/mo3G36](http://plnkr.co/edit/mo3G36?p=info) | | ||
@@ -156,24 +157,29 @@ | ||
## Using with jQuery | ||
## Built-in jQuery Support | ||
You can make simple jQuery plugin based on Bricklayer. | ||
```html | ||
<link rel="stylesheet" href="//npmcdn.com/bricklayer/dist/bricklayer.min.css"> | ||
<script src="//npmcdn.com/bricklayer/dist/bricklayer.min.js"></script> | ||
Add this fragment into your codebase to have bricklayer plugin. | ||
```js | ||
$.fn.bricklayer = function (options) { | ||
$(this).each(function () { | ||
$(this).data('bricklayer', new Bricklayer(this, options)) | ||
}) | ||
} | ||
<!-- You should also add jquery.bricklayer.js --> | ||
<script src="//npmcdn.com/bricklayer/dist/jquery.bricklayer.min.js"></script> | ||
``` | ||
Then you should enable plugin for your bricklayer elements. | ||
```js | ||
var bricklayer = $(".bricklayer").bricklayer() | ||
// Initialize | ||
$(".bricklayer").bricklayer() | ||
bricklayer.eq(0).data('bricklayer').append([ | ||
// items | ||
]) | ||
// Append Elements | ||
$(".bricklayer").appendElements(elements) | ||
// Prepend Elements | ||
$(".bricklayer").prependElements(elements) | ||
// Listen Events (bricklayer.breakpoint, bricklayer.afterAppend, bricklayer.afterPrepend, bricklayer.beforeAppend, bricklayer.beforePrepend) | ||
$(".bricklayer").on("bricklayer.breakpoint", handlerFunction) | ||
``` | ||
For more information you can [play on playground](http://codepen.io/f/pen/zqLJNa). | ||
## Are you using Bricklayer.js for your next project? | ||
@@ -180,0 +186,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3554085
235