[resolved] getJSON does nothing although jQuery is included (2 posts)

  1. mcosx
    Posted 7 years ago #

    I have trouble with wp_enqueue_script('jquery'); and $.getJSON("http://localhost/wp-content/plugins/test/word2json.php", {wordid:2260}, function(json){ alert("JSON Data:"); });

    My code works fine if I don't use jQuery from my WordPress installation. What happens?

  2. mcosx
    Posted 7 years ago #

    Had the time to work on it. I didn't notice that I had to use jQuery().getJSON() instead of $.getJSON().

    The reason is that the built-in jQuery is used in the non-conflict mode that I didn't know so far.

Topic Closed

This topic has been closed to new replies.

About this Topic