Title: How to create a javascript animation when creating an admin theme?
Last modified: October 9, 2018

---

# How to create a javascript animation when creating an admin theme?

 *  Resolved [bogette](https://wordpress.org/support/users/bogette/)
 * (@bogette)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/how-to-create-a-javascript-animation-when-creating-an-admin-theme/)
 * Hey
 * I decided to create my own admin theme. I’ve figured out how to edit styles, 
   but I still don’t understand how to add scripts.
 * I added the necessary code to the plugin. Now I am concerned about the question:
   how to link my JavaScript animation and a certain element in the admin panel.
 * I want to do a button animation on hover in the sidebar. I created a javascript
   animation, attached a javascript file to my plugin. And then the question arises:
   how to link the buttons in this menu with my javascript animation?
    -  This topic was modified 7 years, 8 months ago by [bogette](https://wordpress.org/support/users/bogette/).

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [longnguyen](https://wordpress.org/support/users/longnguyen/)
 * (@longnguyen)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/how-to-create-a-javascript-animation-when-creating-an-admin-theme/#post-10763716)
 * Hi, bogette
 * Did you use the right way to enqueue the scripts to the admin page? Please read
   more here [https://codex.wordpress.org/Plugin_API/Action_Reference/admin_enqueue_scripts](https://codex.wordpress.org/Plugin_API/Action_Reference/admin_enqueue_scripts)
 * `<?php add_action( 'admin_enqueue_scripts', 'function_name' ); ?>`
 *  Thread Starter [bogette](https://wordpress.org/support/users/bogette/)
 * (@bogette)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/how-to-create-a-javascript-animation-when-creating-an-admin-theme/#post-10763867)
 * Hello, [@longnguyen](https://wordpress.org/support/users/longnguyen/)
 * You misunderstand me a little, unfortunately. And no wonder, it’s difficult to
   explain, so it is not less difficult to understand.
 * I get scripts. Me interested in a different question:
 * To change or add styles – you use the selector. It is not difficult to find, 
   it is enough in chrome to go to the “view code” tab of a certain element.
 * What about Javascript? I created a hover button animation (javascript). I connected
   the file with this javascript to the plugin itself.
 * But how to connect this javascript animation to the buttons in the side menu?
   Through Id, through selector? How?
 *  [longnguyen](https://wordpress.org/support/users/longnguyen/)
 * (@longnguyen)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/how-to-create-a-javascript-animation-when-creating-an-admin-theme/#post-10764024)
 * Hi,
 * [https://prnt.sc/l426in](https://prnt.sc/l426in)
 * Each menu has an ID and I’ve tested with simple animation and it works. Maybe
   you not use the right selector?
 *     ```
       (function($){
       	console.log('Hello admin');
   
       	$(document).ready(function() {
       		$('#menu-media').on('mouseenter', function(){
       			$('#menu-media > a').animate({
       				left: '35px',
       			});
       		})
       	})
       })(jQuery)
       ```
   
 *  Thread Starter [bogette](https://wordpress.org/support/users/bogette/)
 * (@bogette)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/how-to-create-a-javascript-animation-when-creating-an-admin-theme/#post-10764269)
 * [@longnguyen](https://wordpress.org/support/users/longnguyen/)
 * I was stupid.. The mistake was trivial, thank you.
 * I want to take this opportunity to ask for your opinion, and maybe even get advice:
 * In General, I need a different layout arrangement of blocks on the “users”page.
 * Look at the picture. I need a second layout.
 * > [View post on imgur.com](https://imgur.com/a/Z9Plrfs)
 * It is important to ask: is it possible to implement it without php knowledge?
   Using only css and javascript? I just had to ask you about it, this problem has
   been bothering me for days.
 * How to do it, if it is really possible? And thanks again!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘How to create a javascript animation when creating an admin theme?’ is
closed to new replies.

## Tags

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

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 4 replies
 * 2 participants
 * Last reply from: [bogette](https://wordpress.org/support/users/bogette/)
 * Last activity: [7 years, 8 months ago](https://wordpress.org/support/topic/how-to-create-a-javascript-animation-when-creating-an-admin-theme/#post-10764269)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
