Created
June 8, 2020 18:52
-
-
Save theflowglenn/2555d3894348336a65f3e017184d86df to your computer and use it in GitHub Desktop.
Used in Webflow projects when you want to use hidden Collections to set sensible values for checkboxes
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
<script> | |
// Dynamically create the Category dropdown from the Collection Data | |
$('.category-select-option-pair').each(function() { | |
var dv = $(this).children('div').eq(0).text(); | |
var av = $(this).children('div').eq(1).text(); | |
$('.category-dynamic-dropdown').append('<option value="' + av + '">' + dv + '</option>'); | |
}) | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment