Special thanks are offered to @Pat J. The problem was actually with the jQuery code I had written.
jQuery(document).ready(function() {
// Some Code Goes Here...
})
Just take a look at the complete segment:
public function doSomethingSpecific() {
?>
<script type="text/javascript" >
jQuery(document).ready(function() {
console.log('Hello World!');
})
}
</script>
<?php
}
Since the above function was not correctly enqueued, and actually supposedly kept running before jQuery was loaded, I received that Uncaught ReferenceError: jQuery is not defined at VM105:23
error. So what I did to solve the problem was to wait for the page to load fully and then call the code. Therefore I changed that jQuery
segment shown above to the following and it was good to go. Problem Solved, and definitely there was no need to enqueue 'jQuery'
.
public function webcamcapchur() {
?>
<script type="text/javascript" >
window.onload = function doLoadThePage(event) {
jQuery(document).ready(function() {
console.log('Hello World!');
})
}
</script>
<?php
}