Saturday, October 27, 2007

My first jQuery bug

Update: Bug has been fixed/closed.

I submitted my first jQuery bug today,  I am pretty sure that it's a bug and not something I am doing wrong, but hey it wouldn't be the first time.

I was trying to use the new jQuery UI to add a drop shadow to a floating DIV. Unfortunately, I was not getting the results I was expecting.

Here is the test HTML I was using to recreate the bug:

<!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" >
<head>
<title>Shadow Page Test</title>
<script src="jquery.js" type="text/javascript" language="javascript"></script>
<script src="jquery.dimensions.js" type="text/javascript" language="javascript"></script>
<script src="ui.shadow.js" type="text/javascript" language="javascript"></script>
<style type="text/css">
#Alert
{
position: absolute;
top: 200px;
left: 200px;
background-color: #ffffff;
width: 200px;
height: 200px;
padding: 10px;
font-weight: bold;
border: 2px solid #ff0000;
}
</style>
<script type="text/javascript" language="javascript">
$(document).ready(function () {
$(
"#Alert").shadow({ offset: 5, color: "#000000" });

});
</script>
</head>
<body>

<div id="Alert">
This is some Alert text!
</div>

</body>
</html>
Again I was using the Shadow pluggin from http://ui.jQuery.com but this is what I was getting:



Notice how the three different colored shadow layers line up under the div instead of stacked so it looks like a shadow?

Anyway I sent it into the bug tracker in jQuery, I am ticket number 1853.

Here are the files to recreate this bug. ui.shadow_bug.zip (17.71 KB)
Name
E-mail
Home page

Comment (Some html is allowed: a@href@title, b, blockquote@cite, em, i, strike, strong, sub, super, u)  

Enter the code shown (prevents robots):

Blog Posts by:

Currently Viewable:

My Twitter Updates

View Twitter Page