Uncaught TypeError: $(...).select2 is not a function

Hey,

I attempt to use select2 which on its own works:

https://www.trip-planner.ai/rp/getCountries.php

But when called within existing webpage using file_get_contents fails Uncaught TypeError: $(…).select2 is not a function

https://www.trip-planner.ai/rp/visit.php?p=Paris+(France)#resultSEARCH

I suspect it has to do with jQuery library, but still cannot fix it.

Any idea how you could fix it?