How to call js function in volt?..when i am trying call a js function like progress(id) ,the function is working but in the view the whole method was printing...
Thank you..but i am not able to pass variables of volt to js function, iam able to variable on view but i am not able to send it to the js function as a parameter.....like progress (files.id)...Can you help?
Think of volt as of general php (because it's rendered to php prior to processing requests).When I need to use a value from php var in js, and to avoid inline js, I usually put it in a hidden element on a page, than I get this element and use it's value in javascript as I need. Otherwise Wojciech's answer is a way to do.