Skip to content

jQuery Plugin

Fatih Kadir Akın edited this page Apr 26, 2016 · 3 revisions

Installation

<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/bricklayer/<version>/bricklayer.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/bricklayer/<version>/bricklayer.min.js"></script>

<!-- You should also add bricklayer.jquery.js -->
<script src="//cdnjs.cloudflare.com/ajax/libs/bricklayer/<version>/plugins/jquery/bricklayer.jquery.min.js"></script>

For advanced installation options plase see installations page.

Note: jQuery Plugin doesn't have directly NPM or Bower installations yet.

Usage

You can enable plugin for your bricklayer elements.

// Initialize
$(".bricklayer").bricklayer()

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