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 |
Shine Effect | 99,105 Kb |
Meters | 13,192 Kb |
Viewer and markers selectors v2 | 14,603 Kb |
Viewer and markers selection from jQuery UI | 4,793 Kb |
Masonry - layoutComplete | 3,321 Kb |
Viewer | 4,358 Kb |
Windows 8 logo animation | 2,232 Kb |
Orgagodeon | 13,272 Kb |
Viewer and markers selectors v2 DEMO | 14,466 Kb |
MyShopi Logo animation | 2,316 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 |
Svg penguin | _massimo | 2,990 Kb |
My three.js practice | Esambino | 3,203 Kb |
Parallax with only CSS | Thulioph | 2,297 Kb |
A cube | KyleDavidE | 18,627 Kb |
Glitchy Text Effect | Kescoe | 2,208 Kb |
Blog Concept - Single Post | Marionebl | 9,603 Kb |
Full page table inside the grid | Twikito | 1,864 Kb |
Material design - button rainbow circle | Kunukn | 3,652 Kb |
NT Tribute | Skybutterfly | 2,850 Kb |
Mapbox Directions with geolocation tracking | Pollardld | 5,827 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!