Modifying a simple code

Go down

Modifying a simple code

Post by D'Leandro™ on Thu 11 Jul - 20:46:14

Hi, I wonder if it has to do with this code online to inform only those who are actually online.

He currently shows online any member who has gone through the forum in the last hour, but I would like him to inform users currently online.

Code:
<div id="onlineStaff">
<span class="staffname">D'Leandro™</span><br>
<span class="staffname">~Rafael~</span><br>
<span class="staffname">Bookmarlucas654</span><br>
<span class="staffname">iTzDaemonTools</span><br>
</div>
<script>
jQuery(function() {
  var x = jQuery('.module', document.getElementById('right'))[1].innerHTML;
  var y = jQuery('.staffname', document.getElementById('onlineStaff'));
  for (var i=0, l = y.length; i<l; i++) {
    if (x.indexOf(y[i].innerHTML) > 0) {
      y[i].innerHTML+=" - Online";
    }
   else { y[i].innerHTML+=" - Offline"; }
  }
});
</script>


Last edited by D'Leandro™ on Thu 11 Jul - 21:38:25; edited 1 time in total
avatar
D'Leandro™
Forumember

Posts : 50
Reputation : 1
Language : Português

Back to top Go down

Re: Modifying a simple code

Post by SLGray on Thu 11 Jul - 21:35:47

 Please change the topic's title into English.


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.

avatar
SLGray
Administrator
Administrator

Male Posts : 43113
Reputation : 3054
Language : English
Location : United States

https://fmthemes.forumotion.com/

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum