Opened 14 years ago
Closed 14 years ago
#3599 closed bug (invalid)
animate: "val is undefined" when animating to an appended element
Reported by: | Okko | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.3 |
Component: | effects | Version: | 1.2.6 |
Keywords: | fx.js fx animate undefined appended element append scrollTo | Cc: | flesler, Okko |
Blocked by: | Blocking: |
Description
The fx.js's animate function does not check that the propertys value is defined before calling its toString method.
52 animate: function( prop, speed, easing, callback ) {
..
79 jQuery.each( prop, function(name, val){
..
85 var parts = val.toString().match(/([+-]=)?([\d+-.]+)(.*)$/),
Test case: http://www.frantic.com/okko/jquery/bug-scroll/
It will produce
"val is undefined
var parts = val.toString().match(/([+-]=)?([\d+-.]+)(.*)$/),"
Change History (3)
comment:1 Changed 14 years ago by
Cc: | Okko added |
---|
comment:2 Changed 14 years ago by
That is true, adding it fixed the error. Thank you.
Should we close this bug or should jQuery be improved so that it can cope with this?
comment:3 Changed 14 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Nope. It's not a bug, just a typo. The html string that you give jQuery must be valid xhtml.
The test case says:
You're missing the opening <.