I am listing some products from database, there is a div to reduce the product quantity from cart and its id is attached with the html id attribute. I want to hide this div on page load. What is best solution for it
<img src="images/add-minus.png" class="minus-image" onClick="removeitem('<?php echo $row12['itemid'];?>')" id="minus-image<?php echo $row12['itemid'];?>">
I need to hide this div on page load
Add style="display:none"
;
For example how to using it and how to display if you need it.
$(document).on("click", "#view", function(){ $('#test').show(); });
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <p id="test" style="display:none">Lorem Ipsum</p> <button id='view' class='pull-left' title='Save'>Show Content</button>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.