0

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>
xxx
  • 15
  • 2
  • At the of this code is exist. – xxx Apr 23 '17 at 21:02
  • Please read http://stackoverflow.com/questions/16166039/adding-jquery-to-primefaces-results-in-uncaught-typeerror-over-all-place – Jasper de Vries Apr 23 '17 at 21:07
  • `load()` expects a url string as first argument to make ajax request. If you are expecting some sort of event ... there is no load event on a `
    `. Provide more details on what you expect this to do
    – charlietfl Apr 23 '17 at 22:40

0 Answers0