Title: wp_enqueue_script &#8211; default scripts included with wp
Last modified: August 20, 2016

---

# wp_enqueue_script – default scripts included with wp

 *  [p4trick](https://wordpress.org/support/users/p4trick/)
 * (@p4trick)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/wp_enqueue_script-default-scripts-included-with-wp/)
 * Hi,
 * does [this section mentioned here](http://codex.wordpress.org/Function_Reference/wp_enqueue_script#Default_scripts_included_with_WordPress)
   means, that I can use those libraries without including them in any way into 
   my wp installation?
 * E.g. If I create a static website with, is it possible to add a script within
   the html-editor and put some jQuery-code in it and it works or do I need to include
   those libraries by myself with wp_enqueue_script() ?
 * Thx in advance,
    p4trick

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

 *  [David Wang](https://wordpress.org/support/users/blogjunkie/)
 * (@blogjunkie)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/wp_enqueue_script-default-scripts-included-with-wp/#post-2594621)
 * The page you linked to provides a list of all JS libraries included with WordPress.
   However, they are not all loaded on every page. You have to use the wp_enqueue_script
   function to include them, for example:
 *     ```
       function my_scripts() {
           wp_enqueue_script('jquery');
       }
       add_action('wp_enqueue_scripts', 'my_scripts_scripts');
       ```
   
 * The above will load jQuery on every page of your site.
 * The 2nd part of your question is whether you can add a script from within the
   html-editor. Technically I believe you can, although switching to the Visual 
   editor may wipe out your JavaScript.
 * I would suggest using a plugin like this: [http://wordpress.org/extend/plugins/specific-cssjs-for-posts-and-pages/screenshots/](http://wordpress.org/extend/plugins/specific-cssjs-for-posts-and-pages/screenshots/)
 *  Thread Starter [p4trick](https://wordpress.org/support/users/p4trick/)
 * (@p4trick)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/wp_enqueue_script-default-scripts-included-with-wp/#post-2594627)
 * Thanks for your reply!
 * So the catch is, I have to modify my theme’s header or I write my own plugin,
   which includes the desired libs in order to get them working. And if I update
   the theme, I have to patch the header again (if I haven’t got a plugin for that).
 * Is there no smoother way include libs. I guess, I am not the only one using jquery-
   code on wordpress.
 * The plugin for adding js and css code is great.
 *  [David Wang](https://wordpress.org/support/users/blogjunkie/)
 * (@blogjunkie)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/wp_enqueue_script-default-scripts-included-with-wp/#post-2594856)
 * Well if you write your own plugin, it won’t get written over when you upgrade
   your theme. What I usually do is to enqueue my scripts from a `functions.php`
   file. If you upgrade your theme, just copy the modification over.

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

The topic ‘wp_enqueue_script – default scripts included with wp’ is closed to new
replies.

## Tags

 * [wp_enqueue_script](https://wordpress.org/support/topic-tag/wp_enqueue_script/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [David Wang](https://wordpress.org/support/users/blogjunkie/)
 * Last activity: [14 years, 2 months ago](https://wordpress.org/support/topic/wp_enqueue_script-default-scripts-included-with-wp/#post-2594856)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
