I have a drop down menu where the div button is clicked and a list is displayed.
In focus, I have to hide the list (i.e. when the user clicks or focuses on some other element, not the mouse). Therefore, my obvious choice was onblur .
JavaScript now works in Firefox, but not in IE, because my div has a sub div with the specified height and width. This is reproduced in a test file. I am using jQuery.
Are these known issues in Internet Explorer? And what is the work around?
<html> <head> <title>Exploring IE</title> <style type="text/css"> .selected_option div {height:18px;} </style> <script type="text/javascript" src="jquery-1.3.2.min9919.js"></script> <script type="text/javascript"> $().ready(function(){ $('.selected_option').blur(function(){ alert('blurred'); }); }); </script> </head> <body> <div class="selected_option" tabindex="0"> <div>anywhere in the page</div> </div> </body> </html>
javascript jquery internet-explorer onblur
yeshvanthni
source share