Add loading javascript in partial tags