| Author |
Jquery clone().text() doesn't work in IE
|
Colin Zheng
Greenhorn
Joined: Oct 25, 2011
Posts: 14
|
|
Hi,
Can you help me understand why this doesn't work in IE but works in FF?
|
 |
Bear Bibeault
Author and opinionated walrus
Marshal
Joined: Jan 10, 2002
Posts: 50691
|
|
It's not a discrete element. You've got that <br> in there that's likely boofing things up. What happens if you remove the <br>?
(<br>? Why aren't you using CSS to control layout?)
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Bear Bibeault
Author and opinionated walrus
Marshal
Joined: Jan 10, 2002
Posts: 50691
|
|
|
I also rarely use .text(). I find that .html() seems to work more reliably.
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15003
|
|
I think I am with Bear on the BR messing it up.
Try
Eric
|
 |
Colin Zheng
Greenhorn
Joined: Oct 25, 2011
Posts: 14
|
|
Yeah, you guys are right: the <br> messed it up. When I removed it, it works in IE now. Thanks for the quick point-out.
I am very frustrated on debugging Javascript in IE as a beginner. Do you have good idea on any tools that we can debug like Firebug in Firefox?
Thanks a lot,
Colin
|
 |
Bear Bibeault
Author and opinionated walrus
Marshal
Joined: Jan 10, 2002
Posts: 50691
|
|
|
Modern versions of IE have a built-in debugger.
|
 |
 |
|
|
subject: Jquery clone().text() doesn't work in IE
|
|
|