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

Popular posts from this blog

javascript - Unusual behaviour when drawing lots of images onto a large canvas -

how can i manage url using .htaccess in php? -

javascript - Chart.js - setting tooltip z-index -