I have this: A bit of javascript that is supposed to inject colored dots.. it works in Chrome, but in firefox the dots just turn out black.
$('.dotholder').html('<p><span style="color:red;">'+"•"+"</span>");
but no matter what I put in for color, what I put the dots are always black. I looked at the firefox HTML tree via firebug, and it looks like firefox is wrapping
<a xmlns="http://www.开发者_JAVA百科w3.org/1999/xhtml"></a>
tags around my dots.
EDIT:
I set a breakpoint, and everything is fine until it hits that line, then all of the sudden an a tag gets wrapped around it. Also, my original script had a closing p tag, I dont know how i lost it when I copied it over. But yes, my code has a /p
I am using 3.6.13
EDIT 2: I removed the explicit "http://www.w3.org/1999/xhtml" attribute from my HTML tag, but the a tags still have it.
Works for me in Firefox 3.6, the dot is red... I'm using Mac. Here's my test code:-
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js"></script>
</head>
<body>
<div class="dotholder" />
<script>
$(document).ready(function(){
$('.dotholder').html('<p><span style="color:red;">'+"•"+"</span>");
});
</script>
</body>
</html>
精彩评论