Masonry - layoutComplete
How do I make an masonry - layoutcomplete?
Forked from David DeSandro's Pen Masonry - layoutComplete.. What is a masonry - layoutcomplete? How do you make a masonry - layoutcomplete? This script and codes were developed by Adrien Clerbois on 30 December 2022, Friday.
Masonry - layoutComplete - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Masonry - layoutComplete</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <h1>Masonry - Toggle</h1>
<div class="toggle" data-masonry-options='{ "isFitWidth": true }'> <span class="title">Panel 1</span> <div class="panel"> <div class="chk"> <input type="checkbox"> <label>Mon text 1</label> </div> <div class="chk"> <input type="checkbox"> <label>Mon text 2</label> </div> <div class="chk"> <input type="checkbox"> <label>Mon text 3</label> </div> <div class="chk"> <input type="checkbox"> <label>Mon text 4</label> </div> <div class="chk"> <input type="checkbox"> <label>Mon text 5</label> </div> <div class="chk"> <input type="checkbox"> <label>Mon text 6</label> </div> </div>
</div>
<div class="toggle"> <span class="title">Panel 1</span> <div class="panel"> <div class="chk"> <input type="checkbox"> <label>Mon text 1</label> </div> <div class="chk"> <input type="checkbox"> <label>Mon text 2</label> </div> <div class="chk"> <input type="checkbox"> <label>Mon text 3</label> </div> <div class="chk"> <input type="checkbox"> <label>Mon text 4</label> </div> <div class="chk"> <input type="checkbox"> <label>Mon text 5</label> </div> <div class="chk"> <input type="checkbox"> <label>Mon text 6</label> </div> </div>
</div>
<div id="notification"></div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='https://masonry.desandro.com/masonry.pkgd.js'></script>
<script src='https://rawgithub.com/desandro/classie/master/classie.js'></script> <script src="js/index.js"></script>
</body>
</html>
Masonry - layoutComplete - Script Codes CSS Codes
* { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;
}
body { font-family: sans-serif;
}
.masonry { background: #EEE; max-width: 640px;
}
/* clearfix */
.masonry:after { content: ''; display: block; clear: both;
}
.masonry .item { width: 120px; height: 60px; float: left; background: #D26; border: 2px solid #333; border-color: rgba(0, 0, 0, 0.5); border-radius: 5px;
}
.toggle { width: 80vw; background: #EEE;
}
.toggle > span { display: inline-block; padding: 5px; font-size: 1.2em; border: 1px solid black; width: 100%;
}
.toggle > span + .panel { width: 100%;
}
.toggle > span + .panel.hide-not-checked .chk.not-checked { display: none;
}
.toggle > span + .panel > .chk { float: left; width: 40vw;
}
.toggle > span + .panel > .chk input { margin-left: 10%; margin-right: 10%;
}
.item:hover { background: #A2C; border-color: white; cursor: pointer;
}
#notification { position: fixed; background: black; opacity: 0; color: white; font-size: 16px; padding: 0.5em; right: 0; top: 0;
}
Masonry - layoutComplete - Script Codes JS Codes
// https://masonry.desandro.com/masonry.pkgd.js added as external resource
// https://rawgithub.com/desandro/classie/master/classie.js added
var notifElem;
docReady( function() { $('.toggle').each(function() { var container = $(this).find('.panel')[0]; notifElem = document.querySelector('#notification'); var msnry = new Masonry(container, { "isFitWidth": true }); msnry.bindResize(); $(this).find('.title').click(function(){ var $panel = $(this).parent().find('.panel'); if($panel.hasClass('hide-not-checked')){ $panel.removeClass('hide-not-checked'); $panel.find('.not-checked').removeClass('not-checked'); } else { $panel.addClass('hide-not-checked'); $panel.find('input').each(function(){ if ($(this).prop('checked')==false){ $(this).parent().addClass('not-checked'); } }); } setTimeout(function(){ msnry.layout(); },150); }); });
});
Developer | Adrien Clerbois |
Username | AClerbois |
Uploaded | December 30, 2022 |
Rating | 3 |
Size | 3,321 Kb |
Views | 8,096 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Orgagodeon | 13,272 Kb |
A Pen by Adrien Clerbois | 6,501 Kb |
Meters | 13,192 Kb |
Viewer and markers selection from jQuery UI | 4,793 Kb |
Shine Effect | 99,105 Kb |
Windows 8 logo animation | 2,232 Kb |
Viewer | 4,358 Kb |
Viewer and markers selectors v2 DEMO | 14,466 Kb |
Audi Ring animation CSS | 1,740 Kb |
Viewer and markers selectors v2 | 14,603 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
AngularJS Skills | Supro | 3,312 Kb |
Hover Animation from UNIQLO | Insprd | 3,772 Kb |
Search field | Jamesbarnett | 2,100 Kb |
Exploring css spinners | Akagr | 3,569 Kb |
The Monty Hall Problem | Melatonind | 4,360 Kb |
Sign Up Form | Sicontis | 5,272 Kb |
Rainbow Drops | Csbarnes | 2,365 Kb |
Marching Squares Visualized | Sakri | 7,074 Kb |
Search Box in Content Moves to Fixed Header | Chriscoyier | 2,768 Kb |
A Pen by lizz | Lizz | 10,068 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!