change all $ to jQuery and enque script this way so your script will load after loading jQuery and since wordpress do use prototype so we cannt use $ user jQuery
wp_enqueue_script('name_of_script','path',array('jquery'));
change all $ to jQuery and enque script this way so your script will load after loading jQuery and since wordpress do use prototype so we cannt use $ user jQuery
wp_enqueue_script('name_of_script','path',array('jquery'));