added jquery if statement for cart click