WordPress.org

Ready to get started?Download WordPress

Forums

JQuery plug in suddenly stopped working? (3 posts)

  1. tbittan
    Member
    Posted 3 years ago #

    Hi,
    My JQuery plug in suddenly stopped working. Have enqueued JQuery and the plug in scripts. Have callled wp_head. Have used no-conflict mode. I am a WordPress beginner but had it working before, hadn't doen anything to the site for a week or so, revisited it and it had stopped working. It's just in a testing environment at the moment.

    Can anyone suggest what might be going wrong?

    <?php wp_enqueue_script("jquery"); ?>
    <?php
    if ( is_page('home') ) {
       // If it's the home page, we want the slider, otherwise don't bother
       wp_register_script('easyslider',
           get_bloginfo('template_directory') . '/js/easySlider1.7.js');
       // enqueue the script
       wp_enqueue_script('easyslider');
    }
    ?>
    <?php
    if ( is_page('our-services') ) {
       // If it's the 'our services' page, we want the capty plug-in, otherwise don't bother
       wp_register_script('capty',
           get_bloginfo('template_directory') . '/js/jquery.capty.min.js');
       // enqueue the script
       wp_enqueue_script('capty');
    }
    ?>
    <?php wp_head();?>
    <?php if ( is_page('home') ) { ?>
    <script type="text/javascript">
    	jQuery.noConflict();
    	jQuery(document).ready(function(){
    		jQuery("#slider").easySlider({
    			auto: true,
    			continuous: true,
    			numeric: true
    		});
    	});
    </script>
    <?php }; ?>
    <?php if ( is_page('our-services') ) { ?>
    <script type="text/javascript">
    	jQuery.noConflict();
    	jQuery(document).ready(function(){
    		jQuery('#desktop,#advice,#infrastructure,#web').capty({
    		animation: 'slide',
    		speed:     400
    		});
    	});
    </script>
    <?php }; ?>
  2. 123milliseconds
    Member
    Posted 3 years ago #

    Is jquery turned on in browser?

  3. tbittan
    Member
    Posted 3 years ago #

    JavaScript is turned on, yes.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.