2

I have created a jQuery Bootgrid table connected with ajax content, and while loading ajax content, it shows me "No results Found!"

<td colspan="4" class="no-results">No results found!</td>

How can I change that td content, and put an image as the content is loading?

Manply
  • 75
  • 1
  • 9

1 Answers1

1

Bootgrid provides a labels option you can use to override some texts. One of them is exactly what you want:

var grid = $("#grid-data").bootgrid({
    ajax: true,
    url: "/api/data/basic",
    labels: {
        noResults: '<img src="http://www.example.com/not-found.png" />'
    }
});

In their documentation you can check what other labels you can override. In your case, instead of replacing with other text, I replaced with an img html tag.

Look this JSFiddle I created. Try searching for something that will result in "no results found".

Alisson Reinaldo Silva
  • 10,009
  • 5
  • 65
  • 83