1 // Returns true if the array contains the element
2 function webdeveloper_contains(array
, element
)
4 // If the array and element are set
9 // If the element does not exist in the array
10 if(array
.indexOf(element
) == -1)
21 var arrayLength
= array
.length
;
23 // Loop through the array
24 for(var i
= 0; i
< arrayLength
; i
++)
26 // If the element is found
27 if(array
[i
] == element
)
38 // Returns true if the array contains media with the given URL
39 function webdeveloper_mediaArrayContains(array
, url
)
41 // If the array and url are set
44 var arrayLength
= array
.length
;
46 // Loop through the array
47 for(var i
= 0; i
< arrayLength
; i
++)
49 // If media with the given URL is found
50 if(array
[i
].src
== url
)