my code
how can I make it appear only once online when I'm online
and offline when they are disconnected ?
- Code:
$(function() {
$('.postprofile dd:first').after('<dd class="online"><span class="online"><span class="ipson">CONECTAT</span></span></dd>');
$('.postprofile dd:first').after('<dd class="offline"><span class="offline"><span class="ipsoff">DECONECTAT</span></span></dd>');
$('.post:not(".online")').addClass('offline');
});
how can I make it appear only once online when I'm online
and offline when they are disconnected ?