Do we? The spotlight effect works fine in IE 9 standards mode.
I took the liberty of unpacking the Spot script and altering it slightly:
Attachment 3931
I was a little disappointed to see that browser sniffing was employed. I devised a means test by declaring the canvas variable earlier and then testing for its getContext property instead of $.browser.msie. That worked to allow IE 9 to display the effect If IE 9 was in standards mode as it is given this page:
HTML Code:
<!DOCTYPE html>
<html>
<head>
<title>Standards Compliant Spotlight Demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- JQuery Core -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
<!-- JQuery Spot-PlugIn -->
<script type="text/javascript" src="jquery.Spot.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('.spot').Spot({
spot_radius: 'auto',
spot_auto_val: 2.10,
spot_luminosity: 500,
spot_color: '#000000',
spot_alpha: 0.9,
spot_switch: 1
});
});
</script>
</head>
<body>
<img class="spot" src="Tri%20bhuana%20tungga%20dewi.jpg" style="width: 420px; height: 599px;" alt="" />
</body>
</html>
Armed with this knowledge I would be inclined to either just wait out the death of IE 8 and less or use IE conditional comments to conditionally use one script or the other.
Edit: Added Later:
While testing this it appears that the packed version of the script doesn't work at all in IE 8 and less. Not even the square spotlight appears. It works OK in IE 9 in IE 9 mode, IE 8 mode and IE 7 mode, but not in the actual IE 8, 7 and 6 browsers.
For what I was saying before about using a .png image, see:
http://home.comcast.net/~jscheuer1/side/flashlight/
Oh, and here's a way to combine the filter approach with the modified jquery.Spot.js script:
http://home.comcast.net/~jscheuer1/side/spotlight/
Bookmarks