1 NumberCount on inbox Mails Sat Apr 30, 2011 4:04 pm
Emilio
Registered Member
Well i want something like when you have 2 new Mails , theres a square or something with "2" on it on the Navigation " inbox" , Is this possible ? maybe with some Js?
$.ajax({
url: '/privmsg?folder=inbox',
success: function(ajax) {
count = $('img[src="http://2img.net/i/fa/punbb/status_unread.png"]', ajax).length;
if (count < 1) {
$('a.mainmenu[href="/privmsg?folder=inbox"]').html('Messages');
}
else {
$('a.mainmenu[href="/privmsg?folder=inbox"]').html('Messages ('+count+')');
}
}
});
<li><a href="/privmsg?folder=inbox">INBOX</a></li>
<li><a href="/privmsg?folder=inbox" class="mailbox">INBOX</a></li>
$.ajax({
url: '/privmsg?folder=inbox',
success: function(ajax) {
count = $('img[src="http://2img.net/i/fa/punbb/status_unread.png"]', ajax).length;
if (count < 1) {
$('a.mailbox').html('Messages');
}
else {
$('a.mailbox').html('Messages ('+count+')');
}
}
});
$.ajax({
url: '/privmsg?folder=inbox',
success: function(ajax) {
count = $('img[src="http://2img.net/i/fa/punbb/status_unread.png"]', ajax).length;
if (count < 1 ) { }
else {
$('a.mainmenu[href="/privmsg?folder=inbox"]').after('<span class="saxPM">'+count+'</span>');
}
}
});
var x = document.getElementById('i_icon_mini_new_message');
if (x) {
$('ul.topnav a[href="/privmsg?folder=inbox"]').after('<span class="dionPM">' + x.title.split(' ')[2] + '</span>');
}
It IS possible:Spudster wrote:This should be possible gangstar is allreaddy shown you
WebArtz - The Web Design Forum » Web Designing & Coding » HTML (Hyper Text Markup Language) » NumberCount on inbox Mails
Similar topics
Permissions in this forum:
You cannot reply to topics in this forum
|
|