mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Hiding user suggests when it's empty
This commit is contained in:
@@ -8,6 +8,7 @@ var Suggestions = {
|
||||
Suggestions.createSuggested(params[x]);
|
||||
}
|
||||
}
|
||||
Suggestions.checkUserEmpty();
|
||||
},
|
||||
|
||||
createSuggested: function(params){
|
||||
@@ -61,6 +62,16 @@ var Suggestions = {
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
checkUserEmpty: function(){
|
||||
var length = $("#user-suggest-html").children().length
|
||||
if(length == 0){
|
||||
if(!Helper.contains($("#user_suggests").attr("class").split(" "), "hide"))
|
||||
$("#user_suggests").addClass("hide");
|
||||
}else{
|
||||
$("#user_suggests").removeClass("hide");
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user