4 ms·
what does this do exactly?
by mlrtime 7y ago
what does this do exactly?
- rripken 7y agoUses javascript to find all the page elements with the coupon add button styling attributes and then uses javascript to click each add button.
- deleted 7y ago[deleted]
- guessmyname 7y ago> $(".grid-coupon-clip-button button").click(); > what does this do exactly? The command allows you to click all buttons in the page at once: • The dollar sign is an alias for jQuery [1]; • The text between double quotes is a CSS selector; • Select every DOM element with a “grid-coupon-clip-button” and “button” CSS class; • The thing at the end is a JavaScript function call which triggers an “onclick” event [2]; [1] https://jquery.com/ https://jquery.com/ [2] https://api.jquery.com/click/ https://api.jquery.com/click/
- altec3 7y agoThis is a great little write up, but the third bullet point should be: - Select every button with a parent element that has the css class “grid-coupon-clip-button”
- jimktrains2 7y agoTo be pedantic, it clicks on elements that are a button element that is the child (at any depth) of an element (of any type) that has at least the class of "grid-coupon-clip-button"