Title: List Administrators with css/javascript hover
Last modified: August 20, 2016

---

# List Administrators with css/javascript hover

 *  [baszer](https://wordpress.org/support/users/baszer/)
 * (@baszer)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/list-administrators-with-cssjavascript-hover/)
 * Hello,
 * I am trying do something just a little out of my range. Hopefully it is very 
   easy for one of you guys and with a little help I can solve it 🙂
 * I have the following code to list my administrators, works fine:
 *     ```
       <ul>
       <?php
           $blogusers = get_users('blog_id=1&orderby=nicename&role=administrator');
           foreach ($blogusers as $user) {
               echo '<li>' . $user->display_name . '</a>' . '</li>';
           }
       ?>
       </ul>
       ```
   
 * now I want to do the following. When a user hovers over an listed user there 
   has to popup some information. For the popping up I have the following code (
   which works of course with a javascript, and I have this also working):
 *     ```
       <a
          onmouseover="ShowContent('popup'); return true;"
          onmouseout="HideContent('popup'); return true;"
          href="javascript:ShowContent('popup')">
       [show on mouseover, hide on mouseout]
       </a>
       <div id="popup">
       	Content goes here.
       </div>
       ```
   
 * Now I want to combine the two. And the trouble starts here for me. Because the‘
   before and after the word popup destroys it. I was thinking something like the
   following code:
 *     ```
       <ul>
       <?php
           $blogusers = get_users('blog_id=1&orderby=nicename&role=administrator');
           foreach ($blogusers as $user) {
               echo '
       <li>' . '<a
          onmouseover="ShowContent('popup'); return true;"
          onmouseout="HideContent('popup'); return true;"
          href="javascript:ShowContent('popup')">' . $user->display_name . '</a> <div id="popup">
       	Content goes here.
       </div>' . '</li>
       ';
           }
       ?>
       </ul>
       ```
   
 * but this is not allowed. Does somebody knows the answer?

The topic ‘List Administrators with css/javascript hover’ is closed to new replies.

## Tags

 * [description](https://wordpress.org/support/topic-tag/description/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [popup](https://wordpress.org/support/topic-tag/popup/)

 * 0 replies
 * 1 participant
 * Last reply from: [baszer](https://wordpress.org/support/users/baszer/)
 * Last activity: [14 years, 1 month ago](https://wordpress.org/support/topic/list-administrators-with-cssjavascript-hover/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
