<! –– Load locations and departments from CMS in the select field ––> <script> $('.select-location').each(function(){ var location = $(this).text(); $('#locations').append('<option value="'+location+'">'+location+'</option>'); }) $('.select-department').each(function(){ var location = $(this).text(); $('#departments').append('<option value="'+location+'">'+location+'</option>'); })
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter