i need help with a menu i'm adding on a jquery chat system called cometchat i've been trying to add a facebook like applications menu and i got it to work with opening and closing and it closes clicking everywhere in the body and the bar but the place it should open and close. if someone can help please 'cause im not good at JS. :/
here is the piece of code:
a("#cometchat_base").append('<div id="cometchat_application" class="cometchat_application menu"><strong>Menu</a></strong></div>');
a("#cometchat_base").append('<div class="menu-content" style="display:none;position:absolute;bottom: 30px;left: 20px;border: 1px solid black;background-color:White;padding: 5px;"><div><a href="#">Menu option 1</a></div><div><a href="#">Menu option 2</a></div></div>');
a(".cometchat_application,.menu").click(function(){a(".menu-content").hide();a(this).next().show();return false;});
a("#page-bg,#cometchat_base,.menu-content a").click(function(){a(".menu-content").hide();});
a(".boo,.menu-content a").click(function(){alert(a(this));});
I tried to change a("#page-bg,#cometchat_base,.menu-content a")
and add the button div class but then it wont open anymore. And the alert(a(this);
i couldnt change so it just opens the link without any alerts.