Title: Where to put this function ?
Last modified: August 19, 2016

---

# Where to put this function ?

 *  [zamaanonline](https://wordpress.org/support/users/zamaanonline/)
 * (@zamaanonline)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/where-to-put-this-function/)
 * folks,
 * i have this jquery and other lib problem.
    i read in articles telling me to put
   this code.but dont no where to put this. i mean in which file in wordpress?
 *     ```
       <script>
            var $j = jQuery.noConflict();
   
            // Use jQuery via $j(...)
            $j(document).ready(function(){
              $j("div").hide();
            });
   
            // Use Prototype with $(...), etc.
            $('someid').hide();
          </script>
       ```
   

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

 *  [Edward Caissie](https://wordpress.org/support/users/cais/)
 * (@cais)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/where-to-put-this-function/#post-1378658)
 * Most scripts will generally be found in or link to from the header.php file of
   your active theme.
 *  [deckster0](https://wordpress.org/support/users/deckster0/)
 * (@deckster0)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/where-to-put-this-function/#post-1378659)
 * Usually, you always place your Javascripts in the header.
    Inside the `<head>
   </head>` tags.
 *     ```
       <script type="text/javascript">
       $(document).ready(function(){
            var $j = jQuery.noConflict();
   
            // Use jQuery via $j(...)
            $j(document).ready(function(){
              $j("div").hide();
            });
   
            // Use Prototype with $(...), etc.
            $('someid').hide();
       });
       </script>
       ```
   

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

The topic ‘Where to put this function ?’ 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/)
 * 2 replies
 * 3 participants
 * Last reply from: [deckster0](https://wordpress.org/support/users/deckster0/)
 * Last activity: [16 years, 4 months ago](https://wordpress.org/support/topic/where-to-put-this-function/#post-1378659)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
