jquery - Bootstrap 3 and masnory -


by using bootstrap 3 , masonry, want display 8 photos :

the desired result :

enter image description here

for this, write code :

html code:

<div class="row">          <div class="items">              <div class="item col-md-3">                 <img src="...." alt="...">             </div>             <div class="item col-md-3">                 <img src="...." alt="...">             </div>             <div class="item col-md-3">                 <img src="...." alt="...">             </div>             <div class="item col-md-3">                 <img src="...." alt="...">             </div>             <div class="item col-md-3">                 <img src="...." alt="...">             </div>             <div class="item col-md-3">                 <img src="...." alt="...">             </div>             <div class="item col-md-3">                 <img src="...." alt="...">             </div>             <div class="item col-md-3">                 <img src="...." alt="...">             </div>       </div> </div> 

jquery code:

var $container = $('.items');  $container.imagesloaded( function() {    $container.masnory({     columnwidth: '.item',     itemselector: '.item'   });  }); 

but result :

enter image description here

why photos not in order ? how can make working ?

any advice helpful. thanks


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -