So I have it set up for VM messages, but i want to replace the pop-up with this picture.
JavaScript code
CSS code
All this code works, i just want to replace the popup now with a picture.
JavaScript code
- Code:
var uid='';
var uname='';
function ddginit() {
var x=document.getElementById('unl');
x.style.display='none';
uid=x.childNodes[0].href.substring(x.childNodes[0].href.indexOf('&u=')+3);
uname=x.childNodes[0].innerHTML;
x.innerHTML='<span id="uid">'+uid+'</span><span id="uname">'+uname+'</span>';
document.body.insertBefore(x,document.body.firstChild);
}
$(function() {
var url = 'u' + uid + 'wall',
count, old;
if (location.pathname.indexOf(url) >= 0) {
count = $('.message-footer:first a:first')[0];
if (count) {
count = /s=(\d+)/.exec(count.href)[1];
my_setcookie('bilde-vm', count);
}
return;
}
$('<div id="bilde-vm"></div>').hide().load(url + ' .message-footer:first a:first', function() {
count = this.firstChild;
old = my_getcookie('bilde-vm') || 0;
if (count) {
count = /s=(\d+)/.exec(count.href)[1];
if (count > old) {
$(this).html('<a href="' + url + '">You have a new visitor message</a>').prependTo(document.body).fadeIn();
}
}
});
});
CSS code
- Code:
/*VM Notification*/
#bilde-vm {
position: fixed;
top: 10px;
left: 10px;
background: E9E9E9;
border: 1px solid #FFF;
padding: 5px;
z-index: 999;
outline: 1px solid #444;
}
#bilde-vm a {
color: #444;
text-decoration: none;
text-shadow: 0 1px 0 #FFF;
}
#bilde-vm a:hover {
text-shadow: 0 -1px 0 #FFF;
}
All this code works, i just want to replace the popup now with a picture.
Last edited by viper8421 on February 6th 2013, 4:27 am; edited 1 time in total