Sha256: 3aeb2e8589f034698b1f91775a198fe1b4c7691deb0efbec8289658e417f6bd1
Contents?: true
Size: 958 Bytes
Versions: 5
Compression:
Stored size: 958 Bytes
Contents
/* replaces help text depending on value selected from 'message type' drop-down */ $(document).ready (function () { var topic_dropdown = $('#message_type_select'); var help_text_div = $('#contact_help_text'); var topic_options = JSON.parse('<%= I18n.t('blacklight.feedback.form.topic.options').to_json.html_safe %>'); var topic_options_keys = Object.keys(topic_options); $(topic_dropdown).change(function() { var selected_option = topic_dropdown.val(); for (var i = 0; i < topic_options_keys.length; i++) { if (selected_option == topic_options[topic_options_keys[i]].option) { if (topic_options[topic_options_keys[i]].help_text != '') { help_text_div.html(topic_options[topic_options_keys[i]].help_text).toggleClass("hidden", false); } else { help_text_div.toggleClass("hidden", true) } } } }); });
Version data entries
5 entries across 5 versions & 1 rubygems