close bracket ajax javascript