[jQuery] jquery + firefox + css("border", "1px solid black") = bug?
Hi all,
I'm not sure if this is the correct place to post this. Anyway, I had
question regarding the css function.
When I use the css function to set the border of a table (border-
collapsed) row in firefox from no border to any border, nothing
happens. However, it works fine in Safari and Webkit. The weird part
is that if I toggle the row off and on using the toggle() function,
then the border will be shown. The other thing that happens is that
if the border is already set beforehand and then I use jquery to
change the color, the border changes color. Is this a firefox bug or
jquery bug? I get the feeling that the border is there, but firefox
is not resizing the component correctly so that we can see it. That
or maybe something else is overwriting it.
Tested on:
jquery 1.3.1
firefox 3.0.6,
safari 3.2.1, (5525.27.1)
webkit r40471
Thanks for your time!
Reyn
the sample code is below:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html lang="en">
<head>
<title></title>
<script src="http://code.jquery.com/jquery.js"></script>
<script>
$(document).ready(function() {
$("#row1").click(function() {
$(this).css("border", "1px solid black");
});
$("#toggle").click(function() {
$("#row1").toggle();
});
});
</script>
<style>
#table1 {
border-collapse: collapse;
}
</style>
</head>
<body>
<table id="table1">
<tr id="row1">
<td>click me</td>
</tr>
</table>
<div id="toggle">
toggle row
</div>
</body>
</html>