Created
June 14, 2023 23:47
-
-
Save chrisjangl/0e77a30717b4ebc4b4c5a5b3d0745b41 to your computer and use it in GitHub Desktop.
Revisions
-
chrisjangl created this gist
Jun 14, 2023 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ // set this to the ID of the group var group = document.querySelector('#wppizza_addingredients-custom-group-96'), // setting this as a variable in case it changes in the future ingredientClass = 'wppizza_addingredients_ingrcg_sortable'; // find the ingredients that are enabled for this group group.querySelectorAll('input[type="checkbox"]:checked').forEach(function(ingredient) { // find the label for the ingredient var label = ingredient.parentElement.innerText; console.info(label); });