Skip to content

Instantly share code, notes, and snippets.

@JodiWarren
Created July 29, 2017 20:03
Show Gist options
  • Select an option

  • Save JodiWarren/6dff7de57fb4e839ff3dbae338a98167 to your computer and use it in GitHub Desktop.

Select an option

Save JodiWarren/6dff7de57fb4e839ff3dbae338a98167 to your computer and use it in GitHub Desktop.
Hide out of stock products on an online store
jQuery("[data-mh=category-list-product]").each((index, item) => {
const availability = jQuery(item).find('.availability');
if(availability.hasClass('out-of-stock')){
item.remove();
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment