The reason for my hate/love feelings today was due to a bug caused by IE 7 not supporting the indexOf() method. I have no idea why IE doesn’t support this method, but it is annoying never-the-less. However, there is an easy fix if you are using jQuery – the inArray() function.
The inArray() function is pretty simple to use.
Instead of having:
You should use:
For those of you crazy nutters that aren’t using jQuery, there is a good post on this blog that will help you out.