i'm attempting to use JQuery to hide this particular div.
<div id="nbar" style="background-color: #f7f7f7; box-shadow: 0 0 1px lightgray; margin-bottom: 20px; padding-left: 0; width: 100%; margin-top: 5px" class="search-navbar collapse navbar-collapse font-xs">
<ul class="no-margin nav navbar-nav">
<li><a href="#" id="ccb">Computer Code</a></li>
<li><a href="#" id="nameb">Name</a></li>
<li><a href="#" id="experienceb">Experience</a></li>
<li><a href="#" id="winsb">No of Win Cases</a></li>
<li><a href="#" id="totalb">Total Cases</a></li>
<li><a href="#" id="tlsrankb">TLS Rank</a></li>
</ul>
<!---End of no-margin nav navbar-nav--->
</div>
using the following code inside document ready function:
function SearchLawyers(SearchText) {
var url1 = "LawyerData/SearchLawyer/?pTextToSearch=" + SearchText;
MyWebApp.Globals.MakeAjaxCall("GET", url1, "{}", function (result) {
if (result.success === true) {
console.log(result);
window.globala = result.data;
debugger;
if (jQuery.isEmptyObject(window.globala.LawyerList)) {
window.isFind = false;
$("#nbar").css({ 'display': 'none' });
$("#nbar").hide();
$(".no-margin nav navbar-nav").hide();
$("#Records").html("<h1>No Results Found...!!!<h1>");
}
else {
window.isFind = true;
DisplayLawyerData(result.data);
}
} else {
MyWebApp.UI.showRoasterMessage(result.error, Enums.MessageType.Error);
}
}, function (xhr, ajaxOptions, thrownError) {
MyWebApp.UI.showRoasterMessage('A problem has occurred while getting Lawyers: "' + thrownError + '". Please try again.', Enums.MessageType.Error);
});
}
despite successful execution of jQuery with no errors, the div remains visible on the page even though "No Records Found" message is displayed.