RJS error: TypeError: Element.insert is not a function

hey guys i am trying to add a text filed dynamically following this link #74 Complex Forms Part 2 - RailsCasts

i'm getting this following error RJS error: TypeError: Element.insert is not a function i have included the required javascript line also in application. but still i am getting this error.

Thanks in advance