Created
January 5, 2015 20:48
-
-
Save DawnPaladin/92cd34c82af94590eb40 to your computer and use it in GitHub Desktop.
Disable all Dijit buttons in an area
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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