Added no results display
This commit is contained in:
+14
-1
@@ -148,11 +148,24 @@ $(document).ready(function() {
|
||||
newResults += '</div>';
|
||||
}
|
||||
newResults += '</div>';
|
||||
if(data.length == 0) {
|
||||
newResults = '<div class="results">';
|
||||
newResults += '<h3>No results.</h3>';
|
||||
newResults += '</div>';
|
||||
}
|
||||
$('.results').replaceWith(newResults);
|
||||
}).fail(function() {
|
||||
console.log( "Query failed" );
|
||||
var newResults = '<div class="results">';
|
||||
newResults += '<h3>No results.</h3>';
|
||||
newResults += '</div>';
|
||||
$('.results').replaceWith(newResults);
|
||||
console.log( "Query failed" );
|
||||
});
|
||||
});
|
||||
|
||||
$('.toggle-btn').on('change', function() {
|
||||
// Re-perform query
|
||||
});
|
||||
|
||||
//$('.results-row').on('click', );
|
||||
});
|
||||
|
||||
@@ -16,6 +16,13 @@ h1 {
|
||||
background-color: #013A3A;
|
||||
}
|
||||
|
||||
h3 {
|
||||
color: #5E9292;
|
||||
text-align: center;
|
||||
padding: 12pt;
|
||||
font-size: 20pt;
|
||||
}
|
||||
|
||||
p {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user