Browse Source

search display

master
rdrew 3 weeks ago
parent
commit
5c7cf12551
  1. 14
      js/custom.js

14
js/custom.js

@ -3,8 +3,18 @@
attach: function (context) { attach: function (context) {
function processField(id) { function processField(id) {
var el = document.getElementById(id); var el = document.getElementById(id);
if (!el || el.value === "") return; if (!el) return;
el.value = parseInt(el.value, 10);
// If value isn't populated yet, wait and retry once
if (el.value === "") {
setTimeout(function () {
processField(id);
}, 100);
return;
}
var str = el.value.toString().slice(0, -3);
el.value = parseInt(str, 10);
} }
once("from-slider", "#nouislider-input-from", context).forEach( once("from-slider", "#nouislider-input-from", context).forEach(

Loading…
Cancel
Save