I have downloaded some script for a notification menu Facebook notification menu and it works fine but what i would like to do is create another link so when you click on the link this current notification will close and the other one will be opened instead. And when you click on the document the notification will be closed as well (PS, this is working today in existing code)
It should work like facebook menu, when you click on friendrequest, messages, or your profile.
<span class="menuoptions active">
<div style="position: relative;">
<div id="notification_li"></div>
<a href="#" id="notificationLink">
<div class="counter">22</div>
Click here to show options
</a>
<div id="notificationContainer">
<div id="notificationTitle">Messages</div>
<div id="notificationsBody" class="notifications">
Notification goes here
</div>
<div id="notificationFooter"><a href="#">See All</a></div>
</div>
</div>
</div>
The jquery code which is currently being used is:
$(document).ready(function()
{
$("#notificationLink").click(function()
{
$("#notificationContainer").fadeToggle(300);
return false;
});
//Document Click
$(document).click(function()
{
$("#notificationContainer").hide();
});
//Popup Click
$("#notificationContainer").click(function()
{
return false
});
});
How should jquery look like to make this work?