I am using the msDropDown jQuery plugin to add images to dropdowns on my site, using their Sprited option. Everything works great in all tested versions of Chrome, Firefox, and IE9. Stepping back to IE7 or IE8, however, breaks things. It still almost works, in that all of the selection elements get the right images. However, the image in the “title” option never changes (e.g. the one that is displayed when you do not have the dropdown open). It always displays the topmost sprite.
I’ll note that this problem appears to be present on the author’s css-version demo. What is going wrong to stop earlier versions from IE from working? How can it be fixed?
In the comments thread on the author’s site, another user and I were going back and forth and it seems that he has found the problem. It isn’t wholely solved, but it should lead to some solutions.
He posted details about what is going on but basically it comes down to an inconsistency in how different versions of IE behave where it comes to interpretting
background-position: Xpx Ypx;vsbackground-position-x: Xpx; background-position-y: Ypx;Initially, I thought that adding some external JS to handle this difference should solve the issue. That failed, however, because all of the events that I could attach to were executed somewhere in the middle of the MS DropDown plugin execution.
Instead, I made direct modification to the plugin. I de-minified, then made my changes, then re-minified. Testing confirms that everything is working properly now. I have forked the MS DropDown repo on gitHub and updated with my new version.