Open NieColon opened 5 years ago
On filters how do I show the "all" filter on default? I couldn't get it to work, and none of the images will show until I click on one of the filters
JS Code:
$('.enable-a').click(function () { $("#filters").justifiedGallery({ filter: '.a' }); }); $('.enable-b').click(function () { $("#filters").justifiedGallery({ filter: '.b' }); }); $('.enable-all').click(function () { $("#filters").justifiedGallery({ filter: false }); }); $('.add-entry-filted-in-d').click(function () { $("#filters > a").removeClass('jg-filtered'); $("#filters > a.d").addClass('jg-filtered'); $("#filters").justifiedGallery({ filter: false }); }); $("#filters").justifiedGallery();``` Html Code ```html <button class="enable-all">all</button> <button class="enable-a">Base Maps</button> <button class="enable-b">Terrains</button> </div> <br/> <div id="filters" > <a class="a" target="_blank" href="https://i.imgur.com/DOS9yy9.png"> <img src="https://i.imgur.com/DOS9yy9.png" alt="Europe Orthographical" width="600" height="400"> </a> <a class="b" target="_blank" href="https://i.imgur.com/UssWp2B.png"> <img src="https://i.imgur.com/UssWp2B.png" alt="Victoria II Terrain" width="600" height="400"> </a> <a class="b" target="_blank" href="https://i.imgur.com/SPjohoZ.jpg"> <img src="https://i.imgur.com/SPjohoZ.jpg" alt="Victoria II City Lights" width="600" height="400"> </a> <a class="b" target="_blank" href="https://i.imgur.com/8IjpiSD.png"> <img class=mapimg src="https://i.imgur.com/8IjpiSD.png" alt="Equitorial Provinces" width="600" height="400"> </a> <a class="a" target="_blank" href="https://i.imgur.com/NCU1ppn.jpg"> <img class=mapimg src="https://i.imgur.com/NCU1ppn.jpg" alt="Victoria II Elevation" width="600" height="400"> </a>```
On filters how do I show the "all" filter on default? I couldn't get it to work, and none of the images will show until I click on one of the filters
JS Code: