Okay I have sorted this already, apparently there were conflicts with other logic in other JavaScript files.