HBLL-Collection-Development/omeka-s-any-cloud

View on GitHub
asset/scripts/toggle.js

Summary

Maintainability
A
0 mins
Test Coverage
$(document).ready(function () {
    $("select").change(function () {
        $(this).find("option:selected").each(function () {
            var optionValue = $(this).attr("value");
            if (optionValue) {
                $(".fieldset").not("." + optionValue).hide();
                $("." + optionValue).show();
            } else {
                $(".fieldset").hide();
            }
        });
    }).change();
});