display:block + height/width causes javascript error in IE6
October 31, 2007 - 5:42pm — y0mbo
| Project: | clueTip - flexible, enhanced tooltip |
| Version: | 0.9.0 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
The following code sample causes errors in IE6. It works fine in Firefox. The issue seems to be when the anchor tag has both the display:block and the height/width set.
The error in IE is "Invalid argument" (line 1 char 1) and happens after the content is loaded.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<style>
.imagediv{display:block;}
/* removing either the display:block or the height and width fixes the error */
.imagediv a{display:block;height:16px;width:16px;}
</style>
</head>
<body>
<script type="text/javascript" src="jQuery.js"></script>
<script type="text/javascript" src="jquery.cluetip.js"></script>
<script type="text/javascript" src="jquery.dimensions.js"></script>
<script type="text/javascript">
$(document).ready(function(){$('a.Anchor').cluetip({sticky:true, closePosition:'title', activation:'click', attribute: 'name', ajaxcache:false, waitimage:true});});
</script>
<div class="imagediv">
<a href="#" class="Anchor" name="nodata.html">Test</a>
</div>
</body>
</html>
Comments
#1
This appears to be working fine. Please see this test page:
http://plugins.learningjquery.com/cluetip/demo/ie6.html
You had two options improperly cased: ajaxcache should be ajaxCache, and waitimage should be waitImage. Maybe that was the cause of the problem?
Anyway, grab a copy of the latest release: 0.9.8. Should work splendidly.