Sha256: d624af4f4e69d665a63045fea920c58a6894c27c818e2bf45b6b37a27a153ba9
Contents?: true
Size: 771 Bytes
Versions: 19
Compression:
Stored size: 771 Bytes
Contents
/* eslint-disable camelcase */ $(document).ready(function () { let typeSelector = $("[data-scope-selector]"); if (typeSelector.length) { let currentValue = typeSelector.data("scope-id"), searchUrl = typeSelector.data("scope-search-url"), targetElement = $(`#${typeSelector.data("scope-selector")}`); if (targetElement.length) { let refresh = function () { $.ajax({ url: searchUrl, cache: false, dataType: "html", data: { type_id: typeSelector.val(), selected: currentValue }, success: function (data) { targetElement.html(data); } }); }; typeSelector.change(refresh); refresh(); } } });
Version data entries
19 entries across 19 versions & 1 rubygems