Last active
August 29, 2015 13:57
-
-
Save msmithstubbs/9617039 to your computer and use it in GitHub Desktop.
Update form label with variant title
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 characters
| $(function() { | |
| $(document).on('change', '.single-option-selector', function() { | |
| var label = $('.notify_form label[for^=contact]'); | |
| if (label.is(':visible')) { | |
| var title = $('.single-option-selector').map(function() { return $(this).val() }).get().join(' '); | |
| label.text("Notify me when the " + title + " are in stock"); | |
| } | |
| }); | |
| }); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this code to the
snippets/product-notify-me.liquidjust before the closing</script>tag.