I am trying to make a code that is easy. I am not very good at jQuery, and I'm sorry for this. Need help with this code lol. Ok so what I am trying to do is make a code that has variables in it which in turns are the Usersnames, this is what I have so far
$(document).ready(function() {
var $NLG = $('ul li a.mainmenu');
$NLG.filter(':contains("USERNAME")function(){
.find('.nlgchat');
//do nothing');
else
.remove('.nlgchat');
});
Yes I know this probably is completely wrong and I am completely lost. But basically what I want done here is if the usernames listed in the :contains variables not to do anything, else if not remove the element completely. Can someone help me to understand this some more, and how to do this code?