After figuring out how to make this widget possible, I'd like to know if it can be modified to not show members who are currently offline. I intend to use profile images to go along with the names of the staff members, but in doing this, too much space will be taken up. So I have resorted to the idea of this new parameter.
Thanks in advance.
- Code:
<style>.staffname{display:block}</style><div id="onlineStaff">
<span class="staffname">MEMBER NAME</span>
<span class="staffname">MEMBER NAME</span>
<span class="staffname">MEMBER NAME</span>
<span class="staffname">MEMBER NAME</span>
<span class="staffname">MEMBER NAME</span>
</div>
<script type="text/javascript">
jQuery(function() {
var x = document.getElementById('left').getElementsByTagName('table')[1];
var y = document.getElementById('onlineStaff').getElementsByTagName('span');
for (i=0; i<y.length; i++) {
if (x.innerHTML.indexOf(y[i].innerHTML) > 0) y[i].innerHTML+=' <img src="'+'http://imageshack.us/a/img198/4198/onlinebg.png'+'">';
else y[i].innerHTML+=' <img src="'+'http://imageshack.us/a/img812/4033/offlinezn.png'+'">'; } });
</script>
Thanks in advance.
Last edited by P-Robs on June 7th 2013, 1:42 am; edited 1 time in total