page.VisualEffect in rails 3 with jquery -


i trying migrate rails 3 , ujs jquery

now old code this:

page['contact_detail_data'].visual_effect :scrollto,:duration => 0.5,:offset => -30 

now in jquery think must use animate

so thought of :

page['contact_detail_data'].animate :scrollto,:duration => 0.5,:offset => -30 

but unsure of how give parameters can please guide me ?

you can use :

page.call("anim_up_down","certification_#{params[:index]}",30,500 ) 

and in javascript

function anim_up_down(ele,extraoffset,duration){      $('html,body').animate({scrolltop: $('#'+ele).offset().top-extraoffset},duration)  } 

Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -