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

Cursor error with postgresql, pgpool and php -

delphi - ESC/P programming! -

c++ - error: use of deleted function -