Skip to content

nbnote/jquery-nnmgrid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

jQuery.nnmGrid

Diagonal grid layout plugin for jQuery

Usage example

HTML

<ul id="container">
<li class="item"><a href="#01"><img src="img/btn01.png" alt=""></a></li>
<li class="item"><a href="#02"><img src="img/btn02.png" alt=""></a></li>
<li class="item"><span><img src="img/btn03.png" alt=""></span></li>
</ul>

CSS

#container {
  width: 630px;
}

JavaScript

// DOM Ready
jQuery(function($){
  var $container = $( '#container' ).nnmGrid({
    gap: 5
    isHover: 'is-hover'
    itemWidth: 150,
    itemHeight: 150,
    itemSelector: '.item',
    onHover: function(){},
    onClick: function(){}
  });
  
  // Update
  $container.width( $(window).width() );
  $container.nnmGrid( 'update' );
});

Demo

http://nbnote.github.io/jquery-nnmgrid/

About

Diagonal grid layout plugin for jQuery

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published