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 - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -