porting of the jquery ujs