@hube2 so I have a really silly question to your answer… How are you enqueuing the script inside the loop itself?
I’m actually trying to do this same thing. Drupal is nice in that I can attach libraries in any template I want and if I can figure out the same for WordPress that would be fantastic!