I'm using JSF and PrimeFaces. I want to run this jquery load() method in the div. But it doesn't work. In HTML src for load() method :https://code.jquery.com/jquery-1.10.2.js. Other src's doesn't work for load method in HTML. Does the problem because of src or PrimeFaces library? Also other jquery methods run. Only load method doesn't work. What can I do?
<script type="text/javascript" src="https://code.jquery.com/jquery-1.10.2.js"></script>
<script>
$(document).ready(function(){
$("div#mydiv").load(function(){
alert("load method runs.");
});
});
</script>
<h:body>
<div id="mydiv">Example of jquery load method.</div>