problem with jQuery online / offline
2 posters
Page 1 of 1
problem with jQuery online / offline
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 ?
Guest- Guest
Re: problem with jQuery online / offline
Well why didn't you just do this:
- Code:
$(function() {
$('.post:not(".online")').addClass('offline');
$('.online .postprofile dd:first').after('<dd class="online"><span class="online"><span class="ipson">CONECTAT</span></span></dd>');
$('.offline .postprofile dd:first').after('<dd class="offline"><span class="offline"><span class="ipsoff">DECONECTAT</span></span></dd>');
});
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Re: problem with jQuery online / offline
Topic Solved & Locked |
Sanket- ForumGuru
- Posts : 48766
Reputation : 2830
Language : English
Location : Mumbai
Similar topics
» online and offline
» online/offline/away
» How to add online/offline icon next to username?
» online & offline status
» Online?offline Tutorial
» online/offline/away
» How to add online/offline icon next to username?
» online & offline status
» Online?offline Tutorial
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum