$ .document null

When I open my page, I get an error: $ .document is null. What for? Secondly, is there any way to determine which way the code below loads the filevalues.php file?

<script type="text/javascript"> try { $(document).ready(function(){ $("#Edit").click(function(){ $.get('fetchvalues.php', null, function(){ alert('reached'); }); }); }); } catch(e) { alert(e.message); } </script> 
+4
source share
3 answers

First of all, there is no such thing as $.document . I suppose you mean $(document) , as that says your code ...?

If $(document) does not work, your jQuery library does not load correctly or conflicts with something else that overwrites the value of $ . If jQuery(document) also does not work, then the first problem.

Firefox Firebug is a very good tool for tracking down such issues. You can reload the page and see the request for the jquery js file, see which path it requests and exactly what it gets in response.

+12
source

Invalid jQuery library path.

+2
source

I had this problem when using jquery. I emptied the document somewhere in code like this $ (This) .empty () and this caused a problem

0
source

All Articles