Playing JSONP in one my project, here’s something worth sharing to those interested.
Here we go.
This is what my L4 controller response :
Then on the implementation, here how it looks like.
To see the out put, watch the console Dude!
Hi grameez… just want to share this case that I have. If you happen to be in a situation that you need to do a check on an item inside an array, please be mindful and watch out when you’re using return inside a loop. It won’t return as expected. I recommend to use a variable handler instead of throwing returns inside the loop.
When you feel like firing Multi AJAX call all at the same ,jQuery $.when is then your best solution.
*Do note that Callback function data is on index “0”, you can inspect data to see other information aside from expected returns.
Here’s how to create a search list that will hide the rest of the list upon typing your search string.