Sha256: 5873f27b1f73150e4742cf0c6722884adb27a45225706272b9b4c911d305dea1
Contents?: true
Size: 640 Bytes
Versions: 4
Compression:
Stored size: 640 Bytes
Contents
/*global cull, dome*/ this.gts = this.gts || {}; /** * Allows <select> options to have a data-description attribute that * contains details about the options that will be displayed in the * element whose id matches that of the select's data-target when * selected. */ this.gts.selectDetails = function (select) { var target = document.getElementById(dome.data.get("target", select)); if (!target) { return; } function updateDescription(e) { target.innerHTML = dome.data.get("description", select.options[select.selectedIndex]); } dome.on(select, "change", updateDescription); updateDescription(); };
Version data entries
4 entries across 4 versions & 1 rubygems