The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Modifying a simple code

2 posters

Go down

Modifying a simple code Empty Modifying a simple code

Post by D'Leandro™ July 11th 2013, 8:46 pm

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 July 11th 2013, 9:38 pm; edited 1 time in total
D'Leandro™
D'Leandro™
Forumember

Posts : 50
Reputation : 1
Language : Português

Back to top Go down

Modifying a simple code Empty Re: Modifying a simple code

Post by SLGray July 11th 2013, 9:35 pm

 Please change the topic's title into English.


Modifying a simple code Slgray10

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

Male Posts : 51464
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Back to top

- Similar topics

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