Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I haven't tried this code, since I don't have a Yelp account (thus no auth tokens), but I immediately see a few problems in your code. For one thing, autocomplete isn't a jQuery function, but rather a jQuery-ui function. You'll need to include the jQuery-ui javascript.</p> <p>Next, there's numerous code errors that any browser console should have brought to your attention. For example, the alert(req); inside the autocomplete call is wrong for a couple reasons... for one thing, you are calling autocomplete with a hash parameter, which is the way you set properties. Therefore, you can't put function calls in there like that. Look at the way the source property of the hash is defined - in the form: attributeName : value</p> <p>Also, even if that code were legal to place there, req hadn't even been defined yet.</p> <p>It seems like you don't have a proper # of matching end braces, but I might be wrong about that - it never hurts to indent code within braces so you can easily line up matching braces visually. </p> <p>It looks like you're using at least one of the browsers' development tools (Firebug, webkit developer mode, etc)... at least that's what I'm guessing since you used console.log() in your ajax callback. Assuming this is the case, your console should tell you that there's errors in your code.</p> <p>As for the above comment about cross-domain Ajax, it's simply incorrect... JSONP with a callback is a technique that gets around cross-domain restrictions, and is supported in at least jQuery 1.4. So, I don't think your problem is that part of your code.</p> <p>Good luck.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload