Title: How to manually add a javascript file
Last modified: August 19, 2016

---

# How to manually add a javascript file

 *  [southstrandbikes](https://wordpress.org/support/users/southstrandbikes/)
 * (@southstrandbikes)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/how-to-manually-add-a-javascript-file/)
 * I am trying to manually install a new javascript file called EasyDrag jQuery.
   The file name is jquery.easydrag.handler.beta2.js and its author’s source page
   is [ here. ](http://fromvega.com/wordpress/2007/07/14/easydrag-jquery-plugin/)
 * Being new to WordPresss, I thought I could simply upload this file to my folder
   called /public_html/wp-includes/js/easydrag/ (I created the “easydrag” folder),
   then add a new line in the public_html/wp-includes/script-loader.php file. The
   line I added is:
 * $scripts->add( ‘easydrag’, ‘/wp-includes/js/easydrag/jquery.easydrag.handler.
   beta2.js’, false, ‘1.5.1’);
 * I cleared the browser cache and reloaded my wordpress home page. when viewing
   the source, there is no reference of the jquery.easydrag.handler.beta2.js file.
   What am I doing wrong?

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

 *  [Aaron Jorbin](https://wordpress.org/support/users/jorbin/)
 * (@jorbin)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/how-to-manually-add-a-javascript-file/#post-1160039)
 * the proper way to add a script is to use [wp_enqueue_script ](http://codex.wordpress.org/Function_Reference/wp_enqueue_script).
   An article with some more explanation is at [http://nickohrn.com/loading-javascript-libraries-in-wordpress-plugins-with-wp_enqueue_script/](http://nickohrn.com/loading-javascript-libraries-in-wordpress-plugins-with-wp_enqueue_script/)
 *  [signupandmakemoney](https://wordpress.org/support/users/signupandmakemoney/)
 * (@signupandmakemoney)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/how-to-manually-add-a-javascript-file/#post-1160313)
 * Thanks for this info, I mean the link, I’ve been looking for an answer like this
   for a while now.
 *  [doc4](https://wordpress.org/support/users/doc4/)
 * (@doc4)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/how-to-manually-add-a-javascript-file/#post-1160314)
 * southstrandbikes,
 * It is also possible to use the Google service:
 *     ```
       <script src="http://www.google.com/jsapi"></script>
       <script> google.load("jquery", "1"); </script>
       ```
   

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

The topic ‘How to manually add a javascript file’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 4 participants
 * Last reply from: [doc4](https://wordpress.org/support/users/doc4/)
 * Last activity: [16 years, 7 months ago](https://wordpress.org/support/topic/how-to-manually-add-a-javascript-file/#post-1160314)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
