Skip to content

Instantly share code, notes, and snippets.

@gerhard
Created September 10, 2008 12:09
Show Gist options
  • Save gerhard/9873 to your computer and use it in GitHub Desktop.
Save gerhard/9873 to your computer and use it in GitHub Desktop.
jQuery('select[name*=product_type_id]').each(function() {
console.log(jQuery(this).val());
// these categories won't have products associated to them
// MAKE SURE the ids stay the same
if ( jQuery.inArray(jQuery(this).val(), ["4", "6", "7"]) )
// hide the product_id select parent, p in this case
jQuery(this).parent().next().hide();
});
// NOTE TO SELF
// SLOW THE FUCK DOWN! RTFM. RTFM AGAIN. AND AGAIN.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment