Hi there,
Need a bit of help with some code as I have NO coding skills
I would like to hide an element (e.g. a heading) when the collection list contains more than 3 items in desktop view, 2 items in iPad view and more than 0 in mobile view.
Tried Google and thought I made it - however, it doesn’t work.
This it what I got so fare:
<script>
@media (max-width: 991px) {
if(!$('.collection-list').length > 3){
$('.heading').hide();
}
@media (max-width: 767px) {
if(!$('.collection-list').length > 2){
$('.heading').hide();
}
@media (max-width: 479px) {
if(!$('.collection-list').length > 0){
$('.heading').hide();
}
</script>
I hope somebody can help me
Regards
Here is my site Read-Only: LINK
(how to share your site Read-Only link)