Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

T.oby on "use jquery get function"

$
0
0

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('http://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 all articles
Browse latest Browse all 8245

Trending Articles