I want to look on my html file and to found if specific script is exist.
I wrote this code :
var scriptExist = false;
$('script').each(function(i,e){
if( $(e).attr('src')){
if( $(e).attr('src').search("load.js)!=-1){
scriptExist = true;
return false;
}
}
});
return scriptExist;
},
it is possible to do this lofic in jQuery without to use.each and to found the specific script for example src = load.js ?
try this:
or you can use
attribute contains selector: