Title: JavaScript in Child Theme
Last modified: August 21, 2016

---

# JavaScript in Child Theme

 *  [kenlu08](https://wordpress.org/support/users/kenlu08/)
 * (@kenlu08)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/javascript-in-child-theme/)
 * Hi,
    I was wondering how to insert <script type=”text/JavaScript”> correctly 
   in wordpress child theme.
 * I was pasting the code into new style.css by using notepad++ and the format looks
   like as below. However, it doesn’t work. Could someone take a look? Thank you
   very much!
 * /*
    <script type=”text/JavaScript”> //courtesy of BoogieJack.com function killCopy(
   e){ return false } function reEnable(){ return true } document.onselectstart=
   new Function (“return false”) if (window.sidebar){ document.onmousedown=killCopy
   document.onclick=reEnable } </script> */

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

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/javascript-in-child-theme/#post-4296619)
 * You should be using [wp_enqueue_script()](http://codex.wordpress.org/Function_Reference/wp_enqueue_script).
 *  Thread Starter [kenlu08](https://wordpress.org/support/users/kenlu08/)
 * (@kenlu08)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/javascript-in-child-theme/#post-4296655)
 * Thanks, I am fairly new on the code and wordpress. Would you mind explaining 
   more details or just simply rewrite the above code if it is possible? Thanks 
   much!!
 *  Thread Starter [kenlu08](https://wordpress.org/support/users/kenlu08/)
 * (@kenlu08)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/javascript-in-child-theme/#post-4296661)
 * I just figured it out. Thx much!

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

The topic ‘JavaScript in Child Theme’ is closed to new replies.

 * 3 replies
 * 2 participants
 * Last reply from: [kenlu08](https://wordpress.org/support/users/kenlu08/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/javascript-in-child-theme/#post-4296661)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
