I have a little problem with creating a new function from a string.
The example: I have a div, and some buttons. One of the buttons just make my div animating, nothing else. But the other button make the div animating and after the animation is complete, call a new function.
I have to handle the new, following function as a variable, because there will be a lot of function I have to call after the div animated.
Here is an example I made: http://jsfiddle.net/AmVSq/3/. I hope you can understand my problem.
I found the new Function(); in JavaScript but it just left me in doubt and the JS console did not log anything.
Can somebody tell me what am I doing wrong?
Thank you so much..





Rating:
The post Convert String to Function in Javascript appeared first on Javascript ASK.
via Javascript ASK http://javascriptask.phpfogapp.com/convert-string-to-function-in-javascript.html
No comments:
Post a Comment