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.
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?
- The topic ‘How to manually add a javascript file’ is closed to new replies.