BlocksIt.js – jQuery Plugin for Dynamic Grid Layout like Pinterest

October 23 2013

Let me introduce you the jQuery plugin that you’ll might use on the next project when the client will ask for a Dynamic Grid Layout similar to Pinterest.
I give you the BlockIt.js. It’s an easy-to-implement and light-weight jQuery Plugin for dynamic and responsive pinterest-like layout.

BlocksIt.js - jQuery Plugin for Dynamic Grid Layout like Pinterest

First, include the jquery min library then the blocksit java script in the head tag of the html:



<script type="text/javascipt" src="jquery.min.js">script>

<script type="text/javascipt" src="blocksit.min.js">script>

Then call the main function .BlocksIt() :

$(document).ready(function() {
   $('#container').BlocksIt({
      numOfCol: 5,
      offsetX: 8,
      offsetY: 8
   });
});

 

The following image describes what of the parameters in the main function stand for:

Layout BlocksIt.js - jQuery Plugin for Dynamic Grid Layout like Pinterest

The following javasript code allows the resizing the browser and changing the number of coulms depenging the size of the screen:

var currentWidth = 1100;
    $(window).resize(function() {
        var winWidth = $(window).width();
        var conWidth;
        if(winWidth < 660) {
            conWidth = 440;
            col = 2
        } else if(winWidth < 880) {
            conWidth = 660;
            col = 3
        } else if(winWidth < 1100) {
            conWidth = 880;
            col = 4;
        } else {
            conWidth = 1100;
            col = 5;
        }
         
        if(conWidth != currentWidth) {
            currentWidth = conWidth;
            $('#container').width(conWidth);
            $('#container').BlocksIt({
                numOfCol: col,
                offsetX: 8,
                offsetY: 8
            });
        }
    });

And the following code is an example of how to implement the plugin.

<div id=”container”>
    <div class=”grid”>
        <div class=”imgholder”>
            <img src=”/images/img1.jpg” />
        </div>
        <strong>Sunset Lake</strong>
        <p>A peaceful sunset view…</p>
        <div class=”meta”>by j osborn</div>
    </div>     
    <div class=”grid”>
        <div class=”imgholder”>
            <img src=”/images/img2.jpg” />
        </div>
        <strong>Herringfleet Mill</strong>
        <p>Just a herringfleet mill…</p>
        <div class=”meta”>by Ian Flindt</div>
    </div>
    .
    .
    .     
    <div class=”grid”>
        <div class=”imgholder”>
            <img src=”/images/img3.jpg” />
        </div>
        <strong>Sundays Sunset</strong>
        <p>Beach view sunset…</p>
        <div class=”meta”>by Robert Strachan</div>
    </div>     
</div>

For this totorial I've uploaded the demo and the zip of the source files, use the following links:

Click » BlocksIt.js jQuery « to view the DEMO

Click » BlocksIt.js jQuery « to DOWNLOAD the EXAMPLE

 

Increase your traffic and leads to your website by using Pinterest

October 17 2012

pinterest-web-design

pinterest statsIf you want to draw more traffic and increase the leads to your website, if you want to generate more revenue per click and to increase your sales you immediately need to create Pinterest account for your business.

Pinterest is a social network site for photo sharing launched in 2009, which allows users to create, manage and visually share new interesting images or videos by posting (also known as ‘pining’) to their own or other Pinterest user pinboards. Users can share images or videos, by uploading the image or video file from their computer or by using the Pin It button to pin things they find on the web.

The popularity of this new social network is growing every day. From December 2011 to January 2012, Pinterest unique visitor increased by 155% and there are approximately 11 million visitors to Pinterest.com as of January.

 

 

 

 

Pinterest Unique Visitors – Graph & Data from Compete.com

While I am searching the internet I found out that there are 23 million active users, more than 70% female users and more referrals than Google+, YouTube and LinkedIn combined. These stats should not be ignored from small, medium or big businesses because Pinterest it’s not just another bookmarking site, but it’s a powerful traffic building tool that can help you to increase your traffic and leads to your website.

Pinterest_statistic

 

How can use Pinterest for your business?

Above I mentioned some important information that indicates that this social network is very important for your business. Now when you decided to take the next step and to create Pinterest account here are some other very useful tips that can help you to use Pinterest in the right way.

The first step after you create your account is to find the right brand and people to follow. You can do this in a couple of different ways. You can link up your account to Facebook or Twitter and based on your other social-media habits Pinterst will give you some suggestions for who you should follow. You may also check out the categories under ‘Everything’ where you can find a thousand of Pinterest ideas and links.

In order to get repins and followers you need to put the Pin It button on your website, blog to show the visitor that you are on Pinterest. To make your content SEO rich try to use the most relevant keywords for your business.

Create great photography but kept it simple and unique. Let your pins to be eye-catching and recognizable but easy to understand in order to attract more followers.

See how easy Pinterest is?

If you have no time to do this, allow to our Web Design Sydney Company to do all this Pinterest work on the best possible way for you.

You will be surprised by the results!

Search for: