Support » Plugins » getJSON does nothing although jQuery is included

  • Resolved mcosx

    (@mcosx)


    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?

Viewing 1 replies (of 1 total)
  • Thread Starter mcosx

    (@mcosx)

    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.

Viewing 1 replies (of 1 total)
  • The topic ‘getJSON does nothing although jQuery is included’ is closed to new replies.