Title: jQuery undefined error fix needed
Last modified: August 21, 2016

---

# jQuery undefined error fix needed

 *  [wnnnews](https://wordpress.org/support/users/wnnnews/)
 * (@wnnnews)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/jquery-undefined-error-fix-needed/)
 * Our main slider is not working.
    Showing this jquery not defined in our home.
   php Need rewrite sample ideas to correct. Thx for helping. ________________
 *  <script type=”text/javascript”>
    (function($) { $(document).ready(function(){
   $(“#photoGalleryBar .container”).jCarouselLite({ <?php if($wpnv_options[‘midautorotate’]
   == 1){ ?> auto:<?php if ( $wpnv_options[“midpausetime”] <> “” ) { echo $wpnv_options[“
   midpausetime”].’000′; } else { echo ‘5000’; } ?>, <?php } ?> scroll: <?php if(
   $wpnv_options[“midscroll”] <> “” ) { echo $wpnv_options[“midscroll”]; } else {
   echo ‘4’; } ?>, speed: <?php if ( $wpnv_options[“midspeed”] <> “” ) { echo $wpnv_options[“
   midspeed”].’000′; } else { echo ‘2000’; } ?>, visible: 5, start: 0, circular:
   false, btnPrev: “#previous_button”, btnNext: “#next_button” }); })})(jQuery) 
   </script>

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

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/jquery-undefined-error-fix-needed/#post-4114759)
 * Inline script dependencies may not be properly resolved unless you are very careful
   where and how the script is inserted. I prefer scripts in external files which
   are enqueued with [wp_enqueue_script()](http://codex.wordpress.org/Function_Reference/wp_enqueue_script).
   You are then assured dependencies are properly resolved. You can pass PHP values
   to jQuery with [wp_localize_script()](http://codex.wordpress.org/Function_Reference/wp_localize_script).
 *  Thread Starter [wnnnews](https://wordpress.org/support/users/wnnnews/)
 * (@wnnnews)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/jquery-undefined-error-fix-needed/#post-4114762)
 * Thanks for your insight on this bcworkz. Did discover that our new cache plugin
   was overwriting the jQuery get directive. After deleting the plugin and reinstalling
   the problem was fixed (for now.. although no guarantees.. as you know!)

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

The topic ‘jQuery undefined error fix needed’ is closed to new replies.

## Tags

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

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 2 replies
 * 2 participants
 * Last reply from: [wnnnews](https://wordpress.org/support/users/wnnnews/)
 * Last activity: [12 years, 9 months ago](https://wordpress.org/support/topic/jquery-undefined-error-fix-needed/#post-4114762)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
