Btndisplay

From rbachwiki
Revision as of 22:59, 26 December 2016 by Bacchas (talk | contribs) (Created page with "=Hide and show certain products with a button= ==HTML== <pre> <div id="filters"> <button id="filter-berry">Toggle berry flavors</button> <!-- <button id="filter-citrus">Toggle...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Hide and show certain products with a button

HTML

<div id="filters">
<button id="filter-berry">Toggle berry flavors</button>
<!-- <button id="filter-citrus">Toggle citrus</button> -->
</div>

JQuery

 $('#filter-berry').click(function(e) {
        e.preventDefault();
        $('#cart-water').find('.berry').slideToggle(500);
    });