> -------------------------------------- > price = $("#field").text(); > -------------------------------------- > This code cause the following error in IE: "object doesn't support > this property or method". > $("#field").text(); returns a string, like: "$21.3". (the data is > price). > I guess the $ character (of "$21.3") make JQuery confused as it thinks > this is a function. > BUT, when I write something like this: > var htmlOut = '<span>' + $("#field").text(); + '</span>' > No error occurs! > What may cause this bug in IE to happen? > Thanks,Major
That doesn't make sense, both statements should execute fine. Can you post a link?