JavaScript enqueuing in header correct?
-
Loading several scripts in the header. Somehow the slider built into the theme does not slide and no JavaScript errors are shown. So I wonder if I am enqueueing all script correctly. Here is the part of the header that loads all except for what NextGen adds later on for galleries + two or three more other plugins on other pages
<?php // Includes the jQuery framework if( !is_admin()){ wp_deregister_script('jquery'); wp_register_script('jquery', ($themePath ."js/jquery-1.4.min.js"), false, '1.4.2'); wp_enqueue_script('jquery'); } // calls hook to WordPress head functions wp_head(); ?> <!-- Feed link / Pingback link --> <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS2 Feed" href="<?php bloginfo('rss2_url'); ?>" /> <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" /> <!-- Favorites icon --> <link rel="shortcut icon" href="<?php echo $themePath ?>images/favicon.ico" /> <!-- Style sheets --> <link rel="stylesheet" type="text/css" href="<?php echo $cssPath ?>css/reset.min.css" /> <link rel="stylesheet" type="text/css" href="<?php echo $cssPath ?>css/menu.min.css" /> <link rel="stylesheet" type="text/css" href="<?php echo $cssPath ?>js/fancybox/jquery.fancybox-1.3.4.css" /> <link rel="stylesheet" type="text/css" href="<?php echo $cssPath ?>css/tooltip.min.css" /> <link rel="stylesheet" type="text/css" href="<?php echo $cssPath ?>style-default.css" /> <link rel="stylesheet" type="text/css" href="<?php echo $cssPath ?>jg-style-customizations.css" /> <!-- jQuery utilities --> <script type="text/javascript"> var themePath = '<?php echo $themePath ?>'; // for js functions </script> <link href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/> <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script> <script type="text/javascript" src="<?php echo $themePath ?>js/jquery.easing.1.3.min.js"></script> <script type="text/javascript" src="<?php echo $themePath ?>js/hoverIntent.min.js"></script> <script type="text/javascript" src="<?php echo $themePath ?>js/jquery.bgiframe.min.js"></script> <!-- Drop down menus --> <script type="text/javascript" src="<?php echo $themePath ?>js/superfish.min.js"></script> <script type="text/javascript" src="<?php echo $themePath ?>js/supersubs.min.js"></script> <!-- <script type="text/javascript" src="<?php echo $themePath ?>js/jquery.curvycorners.packed.js"></script> --> <!-- AJAX Form submission --> <script type="text/javascript" src="<?php echo $themePath ?>js/jquery.form.js"></script> ?>
Does this seem correct?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘JavaScript enqueuing in header correct?’ is closed to new replies.