I am using jquery to change the background of a dropdown. For some reason it now requires two clicks to select an item, instead of one click.
What i cannot find out is why this occurs and an efficient workaround or better yet a fix. This seems to be occuring in ie7 & ie 8 (had a friend test it on their box) Below is the exact code we are using to test this issue.
-----------------------------COMPLETE MARKUP --------------------------------
<script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
<style type="text/css">
.yellowBackground, .yellowBackground > * > *
{
background-color: #FFFF79;
}
</style>
<script type="text/javascript">
$(document).ready(function() {
$('select').focus(function() {
$(this).addClass('yellowBackground');
})
});
</script>
</head>
<body>
<form>
<select>
<option value="A">Option 1</option>
<option value="B">Option 2</option>
</select>
</form>
</body>
</html>