Title: Javascript is Not working on the Theme
Last modified: August 22, 2016

---

# Javascript is Not working on the Theme

 *  [Alen](https://wordpress.org/support/users/alenma/)
 * (@alenma)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/javascript-is-not-working-on-the-theme/)
 * I added this code along with the Resource of the Date picker:
 *     ```
       $('#movedate').datetimepicker({
       		dayOfWeekStart : 1,
       		lang:'en'
       		});
       ```
   
 * But the code won’t work. I also tried alert(“Hello”); … still not working. I 
   don’t know what I’ve done wrong.
 * Can anyone help me.

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

 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [11 years, 6 months ago](https://wordpress.org/support/topic/javascript-is-not-working-on-the-theme/#post-5499238)
 * In WordPress jQuery has to be run in noconflict mode, e.g. you can’t do this:
 *     ```
       $
       ```
   
 * You have to do this first:
 *     ```
       $ = jQuery;
       ```
   
 *  Thread Starter [Alen](https://wordpress.org/support/users/alenma/)
 * (@alenma)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/javascript-is-not-working-on-the-theme/#post-5499269)
 * so the right coding must be:
 *     ```
       jQuery(function ($) {
       	/* You can safely use $ in this code block to reference jQuery */
       });
       ```
   
 * Is that it?

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

The topic ‘Javascript is Not working on the Theme’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/bearded/1.0.6/screenshot.png)
 * Bearded
 * [Support Threads](https://wordpress.org/support/theme/bearded/)
 * [Active Topics](https://wordpress.org/support/theme/bearded/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/bearded/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/bearded/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Alen](https://wordpress.org/support/users/alenma/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/javascript-is-not-working-on-the-theme/#post-5499269)
 * Status: not resolved