• 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

    (@bcworkz)

    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(). You are then assured dependencies are properly resolved. You can pass PHP values to jQuery with wp_localize_script().

    Thread Starter wnnnews

    (@wnnnews)

    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.