Ajax script seems not to work anymore
2 posters
Page 1 of 1
Ajax script seems not to work anymore
I use this ajax script to count the new PM's but it seems not working anymore I have a custom navbar, was working fine one PunBB before I switched to phpBB3.
Any idea on how to fix this...
- Code:
$.ajax({
url: '/privmsg?folder=inbox',
success: function(ajax) {
count = $('img[src="http://i78.servimg.com/u/f78/14/73/12/96/bf_new10.png"]', ajax).length;
if (count < 1) {
$('a.mailbox').html('<span>Mailbox</span>');
}
else {
$('a.mailbox').html('<span>Mailbox ('+count+')</span>');
}
}
});
Any idea on how to fix this...
Last edited by Mati™ on November 12th 2014, 8:22 am; edited 1 time in total
Re: Ajax script seems not to work anymore
Hello Mati,
Are you using this image for new messages ?
https://i.servimg.com/u/f78/14/73/12/96/bf_new10.png
Are you using this image for new messages ?
https://i.servimg.com/u/f78/14/73/12/96/bf_new10.png
Re: Ajax script seems not to work anymore
Yeah that's the "Subject - New" icon from the Icons for topics.
Re: Ajax script seems not to work anymore
Try this :
- Code:
$.ajax({
url: '/privmsg?folder=inbox',
success: function(ajax) {
count = $('dl[style*="http://i78.servimg.com/u/f78/14/73/12/96/bf_new10.png"]', ajax).length;
if (count < 1) {
$('a.mailbox').html('<span>Mailbox</span>');
}
else {
$('a.mailbox').html('<span>Mailbox ('+count+')</span>');
}
}
});
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum