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

html - Cut text on left side inside button while centering -

java - Last square of 8x8 grid not drawn, using two nested FOR loops -

What design pattern is this code in Javascript? -