jQuery Syntax assistance filter function - wrap element according to condition

jQuery Syntax assistance filter function - wrap element according to condition

Using jQuery version:  jquery-1.11.1.min.js
I have code that shows or hides elements according to filter.
I need help including a condition where if the browser is IE then according to the filter wrap the unmatching elements with a SPAN and hide them, and the other way around - unspan and show.
I do not know the syntax and I failed repeatedly.
I'm really stuck, please help (if you can by tweaking my code)
My Code:
  1.  <!--This is where I filter the ListBox (select) >> (option) elements via keystrokes --> <!--Via jQuery on my Listbox control I add a css class so I can work with it here - class ".srcItem" --> <script type="text/javascript"> $(document).ready( function () { var elemSrc = document.getElementById("<%=srcBox.ClientID%>"); $(elemSrc).find("option").addClass("srcItem"); } ); </script> <script type="text/javascript"> $(document).ready( function () { var $users = $('.srcItem'); $('#usrSearch').keyup(function () { $users.show(); //THis is regular jQuery that works only in Chrome return; } var val = $.trim($(this).val()).replace(/ +/g, ' ').toLowerCase(); //Below is regular jQuery that works only in Chrome $users.show().filter(function () { var text = $(this).text().replace(/\s+/g, ' ').toLowerCase(); return !~text.indexOf(val); }).hide(); }); } ); </script>

What I'm asking for is a code adjustment that will wrap the option element with a span element incase the browser is IE.
P.S.
If my code gets minified via this post, I'm not sure why that occurs but sorry for this in advance.