javascript - Jquery - type error, is not a function -
i working on widget embedded on customers website, loads jquery file. need detect if jquery loaded on customers page avoid conflicts , not load our own jquery.
as sidenote widget works on versions of jquery. code being used is...
if (typeof jquery == 'undefined') { console.log("not loaded"); scripts.push("https://d33f10u0pfpplc.cloudfront.net/perun/v1/js/widget/betav2/jquery-1.8.2-min.js"); }
this works when tested locally, when rolled out on sites got ...
type error $tabs(...) not function
it seems jquery on host sites must not have been loaded initial theory (could wrong)
is there way improve jquery detection used above? or if know why not working happy learn. thanks
first of all, $tabs
not standard jquery function. if it's part of plugin, need make sure that's included well.
also make sure jquery isn't being run in noconflicts
mode. in case, jquery
may defined, not $
.
Comments
Post a Comment