Access direct function and via jquery