call javascript while rendering a partial in rails 3 -
i need call javascript while rendering partial in rails 3. like:
_my_partial.html.erb
whenever partial renders, javascript function should called.
try in _my_partial.html.erb
:
for html
:
# partial code <script type="text/javascript"> your_function(); </script>
for haml
:
# partial code :javascript your_function(#{@variable});
Comments
Post a Comment