jQuery not loading in local wordpress install

Can anyone tell why my jQuery script is not loading here

<?php wp_enqueue_script("jquery"); ?>

<?php wp_head(); ?>

<script src="http://gsgd.co.uk/sandbox/jquery/easing/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/slides.jquery.js"></script>
<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/my-js-file.js"></script>

        <script>
        $(document).ready(function() {
                        $('#slides').slides({
                                preload: true,
                                preloadImage: 'img/loading.gif',
                                play: 5000,
                                pause: 2500,
                                hoverPause: true
                        });
                });
        </script>

</head>

Answers


<?php
function my_scripts_method() {
    wp_deregister_script( 'jquery' );
    wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js');
    wp_enqueue_script( 'jquery' );
}    

add_action('wp_enqueue_scripts', 'my_scripts_method');
?>

Or simply use the latest version from jquery.com

<script src="http://code.jquery.com/jquery-latest.min.js"></script>

Good luck! :)


Not sure if the double quotes are what's causing the problem, it's a good idea to enqueue scripts for the front end via functions.php and not in header.php. Like so;

if ( !is_admin() ) {
wp_enqueue_script('jquery');
}

Need Your Help

Mvvm model ViewModel

c# wpf mvvm

It can be named MVVM model or not? Because View interacts with DataModel through

JavaScript: Use Replace to add space after "00" before a-z A-Z

javascript regex

I am working on a form that has an input field that needs to automatically add a space between "00" and a-z or A-Z.