The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Modifying a simple code

View previous topic View next topic Go down

Modifying a simple code

Post by D'Leandro™ on 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™
Forumember

Posts : 50
Reputation : 1
Language : Portuguęs

Back to top Go down

Re: Modifying a simple code

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

 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.


SLGray
Administrator
Administrator

Male Posts : 36711
Reputation : 2446
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

View previous topic View next topic Back to top


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