Update js/widgets/forms/select.custom.js

hasAttribute only supported on IE8+ so using a getAttribute workaround.