Skip to content

Instantly share code, notes, and snippets.

@DawnPaladin
Created January 5, 2015 20:48
Show Gist options
  • Save DawnPaladin/92cd34c82af94590eb40 to your computer and use it in GitHub Desktop.
Save DawnPaladin/92cd34c82af94590eb40 to your computer and use it in GitHub Desktop.
Disable all Dijit buttons in an area
dojo.query(".addToCartBtn, .dijitDropDownButton", "searchResultsContainer") // find Add to Cart/Add to Wishlist buttons in #searchResultsContainer
.map(dijit.byNode) // convert from DOM nodes to Dijit refs (see http://stackoverflow.com/a/1375150/1805453)
.forEach(function(element){ // iterate over results
element.attr('disabled', true);
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment