use jquery get function
-
Hi, I would like to use the javascript jquery get function in the following simple example:
<script type="text/javascript" src="/wp-includes/js/jquery/jquery.js"></script> <script type="text/javascript"> $.get('https://www.w3schools.com/images/w3schoolscom_gray.gif').done( function() { alert("image exists"); }).fail(function() { alert("image does not exist"); }) </script>
I assume here that the jquery library is in ‘/wp-includes/js/jquery/jquery.js’ of the wordpress root folder which seems to be the case for my wordpress installation. However I think I am missing something because when opening the page nothing comes up.
Thanks for any help!
Toby
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘use jquery get function’ is closed to new replies.