(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-NK8H86R'); Contact - Copley Scientific
// Placeholder for dropdowns const $placeholder = $("select[placeholder]"); if ($placeholder.length) { $placeholder.each(function() { const $this = $(this); // Check if placeholder option already exists if (!$this.find("option[value='']").length) { // Initial $this.addClass("placeholder-shown"); const placeholder = $this.attr("placeholder"); $this.prepend(`${placeholder}`); } // Change $this.on("change", (event) => { const $this = $(event.currentTarget); if ($this.val()) { $this.removeClass("placeholder-shown").addClass("placeholder-hidden"); } else { $this.addClass("placeholder-shown").removeClass("placeholder-hidden"); } }); // Check initial value and add/remove class accordingly if ($this.val()) { $this.removeClass("placeholder-shown").addClass("placeholder-hidden"); } else { $this.addClass("placeholder-shown").removeClass("placeholder-hidden"); } }); }