fixed the element wrapping for ie8 compatibility

I've fixed an issue found on IE8 where the span that wraps the input is not being applied producing wrong behavior. This happens because when calling the jquery wrap() method, the span doesn't have the </span> closing tab and this breaks the functionality in IE8 as it doesn't support HTML5.