Empty results DOM #31

basham opened this Issue Mar 20, 2012 · 5 comments


None yet

4 participants


I'd like to attach some sort of markup that would inform the user when there are no results from the server (determined by an empty array server output). Currently, the only way I see to determine this is to check the data length from a custom processData function, since there's no other callback. Is this the preferred way? It would be nice to have a <div> already created and positioned where the $results DOM is, which displays when there's no results. This would enable something like what Facebook does:

Facebook Empty Results


I'll do this but it takes a little more time than expected. Please have some patience :-)


Absolutely. My head was spinning a bit thinking about proper implementation. I would be astonished if this feature was a simple 20-min upgrade. Good luck.


Hi Dyve,

Thx for your work on this plugin. What about this feature ?
I'd like to add some default values to be displayed with or without results ... Any advice ?


I worked around the lack of this feature in the following way:

  • Check if there are any results in processData
  • Add a "fake" result item if so
  • Interpret the fake item in showResult, rendering your custom DOM

In the process, I had to worked around issue #96, but in the end it works out pretty well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment