Title: Mootools
Last modified: August 19, 2016

---

# Mootools

 *  Resolved [Mobster](https://wordpress.org/support/users/mobster/)
 * (@mobster)
 * [16 years, 12 months ago](https://wordpress.org/support/topic/mootools/)
 * I have been having issues a with mootools plugin and WordPress.
 * Everything seems to function properly on a static page but secondary pages show
   errors and fail to function.
 * Is there be a “preferred” way to import JavaScript in WordPress that loads as
   the static content would?
 * I have already tried this:
 * `wp_enqueue_script('mootools', get_bloginfo('template_directory') .'/js/mootools.
   js', false, '1.1.1');`
 * I have also tried adding linked JavaScript directly to the page in question. 
   That doesn’t seem to work properly either.

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

 *  Thread Starter [Mobster](https://wordpress.org/support/users/mobster/)
 * (@mobster)
 * [16 years, 12 months ago](https://wordpress.org/support/topic/mootools/#post-1080794)
 * No ideas?
 *  Thread Starter [Mobster](https://wordpress.org/support/users/mobster/)
 * (@mobster)
 * [16 years, 12 months ago](https://wordpress.org/support/topic/mootools/#post-1080812)
 * Ok,
 * For those of you having issues with mootools plugins. I found this little plugin
   which isn’t all that complicated to use or hack.
 * Plugin Name: Mootools Framework
    Plugin URI: [http://nilswindisch.de](http://nilswindisch.de)
 * I just added all my mootools plugins to be included as an action.
 *     ```
       add_action("wp_head","domready");
   
       function domready() {
       	echo "\n\n<script type='text/javascript' src='".get_bloginfo('wpurl')."/wp-content/plugins/mootools-framework/domready.js'></script>\n\n";
       }
       ```
   
 * Now all my plugins work on all pages.
 * Problem solved.
 *  [gabi_cavaller](https://wordpress.org/support/users/gabi_cavaller/)
 * (@gabi_cavaller)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/mootools/#post-1080878)
 * Sounds perfect for what I need.
 * Please could you demonstrate exactly what you did and where you put the coding
   in as I cannot get it to work and have just started doing it?
 * The initial code you posted did not work for me, could be doing it all wrong 
   though?
 * Any info would be greatly appreciated.
 * Thanks in advanced,
 * Gabi.
 *  [gabi_cavaller](https://wordpress.org/support/users/gabi_cavaller/)
 * (@gabi_cavaller)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/mootools/#post-1080881)
 * Hi,
 * I finally got it working without additional plugins or anything like that.
 * The syntax I used is the following;
 * `<script type="text/javascript" src="<?php echo bloginfo('template_directory');?
   >/mootools.js"></script>`
 * Instead of this;
 * `<SCRIPT language=JavaScript src="<?php bloginfo('stylesheet_directory'); ?>/
   mootools.js" type=text/javascript></SCRIPT>`
 * Thanks,
 * G.
 *  [w77](https://wordpress.org/support/users/w77/)
 * (@w77)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/mootools/#post-1080920)
 * Just to clarify for others, add the .js files to your template directory
 *  [davoscript](https://wordpress.org/support/users/davoscript/)
 * (@davoscript)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/mootools/#post-1080948)
 * Well, actually you can add your JS files anywhere inside your theme, i recomend
   to do this:
 * > /my_theme/js/scripts.js
 * You should always use the WordPress native [“wp_enqueue_script”](http://codex.wordpress.org/Function_Reference/wp_enqueue_script)
   function instead of hardcode, actually in the examples above, we see how **<?
   php bloginfo(‘stylesheet_directory’); ?>** is beeing used, wich is wrong since
   you could be using a “child-theme”.
 * David.

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

The topic ‘Mootools’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 4 participants
 * Last reply from: [davoscript](https://wordpress.org/support/users/davoscript/)
 * Last activity: [16 years, 1 month ago](https://wordpress.org/support/topic/mootools/#post-1080948)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
