I'm not entirely sure if the title of my question makes any sense but I'll try and explain it further as I'm struggling to get this code working.
I'm scanning through a page for any script tags and I then extract the src values of them. All I want to do now is to check if the Jquery object has either of the two specific directories within it. If it does then I will do some other work with them. My code so far looks like this;
var scriptTags = $('script');
var directoryNames = ['abc/custom','xyz/custom'];
for (var i = 0; i < scriptTags.length; i++) {
var srcVal = scriptTags[i].src;
if (ANY DIRECTORY NAME VALUES FOUND WITHIN scriptTags) {
console.log('found');
}
}
I'd really appreciate if anyone could shed some light on this,please?
Thanks.