here use the twig url function with the settings.route

and remove the block-parent part and use jquery parent : http://api.jquery.com/parent/