Fix to loadElements

Fixes loadElements to execute the callback and return immediately if the slider doesn't contain anything that needs loading. This stops it showing the loading screen indefinitely.