Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Old 07-22-2010, 06:23 AM   PM User | #1
CarlMartin10
Regular Coder

 
Join Date: Apr 2010
Posts: 145
Thanks: 20
Thanked 0 Times in 0 Posts
CarlMartin10 is an unknown quantity at this point
JQuery multiple load problem, help please

I am having trouble with a plugin not working, so I contacted the creator, and they said the below. I have no idea how to do what they want. Can anyone help me out?

"Hi The Billboard Family,
We just took a look at your output. It looks like you have jquery loading 3 times, which is not good. This will cause most all jQuery plugins/code to break if you load the jquery library more than once.

It looks like you have it loading with your "Enhanced Search Box" and then again at the end of your head just before your "Cycle.All" script.

Please be sure that the PHP method wp_head() is that LAST piece of code running before your close head tag in your header.php file as well as wp_footer() being the LAST piece of code running before your close body tag in your footer.php file.

I would also recommend running WordPress' wp_enqueu_scripts() method, detailed here by Jamie:
http://getsatisfaction.com/slidedeck/...

Once you get those changes made and jQuery running only once please let us know if you are still having problems.

Cheers! "


MY SITE: http://billboardfamily.com/?page_id=4
CarlMartin10 is offline   Reply With Quote
Old 07-22-2010, 07:35 AM   PM User | #2
SB65
Regular Coder

 
Join Date: Feb 2009
Location: West Yorkshire
Posts: 985
Thanks: 7
Thanked 220 Times in 218 Posts
SB65 is on a distinguished road
Lines 13 to 80 of your code below:

Code:
<link rel="stylesheet" type="text/css" href="http://billboardfamily.com/wp-content/plugins/slidedeck-lite-for-wordpress/skins/default/skin.css?v=1.1" media="screen" />
<script type='text/javascript' src='http://billboardfamily.com/wp-includes/js/jquery/jquery.js?ver=1.4.2'></script>

<script type='text/javascript' src='http://billboardfamily.com/wp-includes/js/comment-reply.js?ver=20090102'></script>
<script type='text/javascript' src='http://billboardfamily.com/wp-content/plugins/slidedeck-lite-for-wordpress/lib/slidedeck.jquery.lite.pack.js?ver=1.3'></script>
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://billboardfamily.com/xmlrpc.php?rsd" />
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://billboardfamily.com/wp-includes/wlwmanifest.xml" /> 
<link rel='index' title='Billboard Family' href='http://billboardfamily.com' />
<link rel='prev' title='About Us' href='http://billboardfamily.com/?page_id=2' />
<link rel='next' title='Calendar' href='http://billboardfamily.com/?page_id=22' />
<meta name="generator" content="WordPress 3.0" />

<!-- All in One SEO Pack 1.6.12.1 by Michael Torbert of Semper Fi Web Design[330,374] -->
<link rel="canonical" href="http://billboardfamily.com/?page_id=4" />
<!-- /all in one seo pack -->

<!-- Start Of Script Generated By cforms v11.5 [Oliver Seidel | www.deliciousdays.com] -->
<link rel="stylesheet" type="text/css" href="http://billboardfamily.com/wp-content/plugins/cforms/styling/minimal.css" />

<script type="text/javascript" src="http://billboardfamily.com/wp-content/plugins/cforms/js/cforms.js"></script>
<!-- End Of Script Generated By cforms -->

<!-- begin Enhanced Search Box -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){var searchTextDefault = "";var searchBox = $("#s");var searchBoxMain = $("#content .s");searchBox.attr("value", searchTextDefault);searchBoxMain.attr("value", searchTextDefault);searchBoxMain.focus(searchFocus);searchBoxMain.blur(searchBlur);searchBox.focus(searchFocus);searchBox.blur(searchBlur);function searchFocus(){ $(this).addClass("active"); if($(this).attr("value") == searchTextDefault) $(this).attr("value", ""); };function searchBlur(){ $(this).removeClass("active"); if($(this).attr("value") == "") $(this).attr("value", searchTextDefault); };});
</script>
<!-- end Enhanced Search Box -->

<script type="text/javascript">var AKPC_IDS = "";</script>
	<link type="text/css" rel="stylesheet" href="http://billboardfamily.com/wp-content/plugins/wordpress-paypal-shopping-cart/wp_shopping_cart_style.css" />

	<script type="text/javascript">
	<!--
	//
	function ReadForm (obj1, tst) 
	{ 
	    // Read the user form
	    var i,j,pos;
	    val_total="";val_combo="";		
	
	    for (i=0; i<obj1.length; i++) 
	    {     
	        // run entire form
	        obj = obj1.elements[i];           // a form element
	
	        if (obj.type == "select-one") 
	        {   // just selects
	            if (obj.name == "quantity" ||
	                obj.name == "amount") continue;
		        pos = obj.selectedIndex;        // which option selected
		        val = obj.options[pos].value;   // selected value
		        val_combo = val_combo + "(" + val + ")";
	        }
	    }
		// Now summarize everything we have processed above
		val_total = obj1.product_tmp.value + val_combo;
		obj1.product.value = val_total;
	}
	//-->
	</script>

	<link rel="stylesheet" type="text/css" href="http://billboardfamily.com/wp-content/themes/mensa/assets/css/style.css" />
	<link rel="stylesheet" type="text/css" href="http://billboardfamily.com/wp-content/themes/mensa/assets/css/lightbox.css" />

	<!--[if lte IE 6]>
	<link rel="stylesheet" type="text/css" href="http://billboardfamily.com/wp-content/themes/mensa/assets/css/ie6.css" />
	<![endif]-->
	
	<script type="text/javascript" src="http://billboardfamily.com/wp-content/themes/mensa/assets/js/jquery-1.3.2.min.js"></script>
	<script type="text/javascript" src="http://billboardfamily.com/wp-content/themes/mensa/assets/js/jquery.cycle.all.min.js"></script>
	<script type="text/javascript" src="http://billboardfamily.com/wp-content/themes/mensa/assets/js/scripts.js"></script>
Just as the note says, you are loading (two different versions of) jquery three times. Try deleting the lower two. I'm assuming you have manually added these to your WP header.php file.
SB65 is offline   Reply With Quote
Old 07-22-2010, 10:18 AM   PM User | #3
CarlMartin10
Regular Coder

 
Join Date: Apr 2010
Posts: 145
Thanks: 20
Thanked 0 Times in 0 Posts
CarlMartin10 is an unknown quantity at this point
Quote:
Originally Posted by SB65 View Post
Lines 13 to 80 of your code below:

Code:
<link rel="stylesheet" type="text/css" href="http://billboardfamily.com/wp-content/plugins/slidedeck-lite-for-wordpress/skins/default/skin.css?v=1.1" media="screen" />
<script type='text/javascript' src='http://billboardfamily.com/wp-includes/js/jquery/jquery.js?ver=1.4.2'></script>

<script type='text/javascript' src='http://billboardfamily.com/wp-includes/js/comment-reply.js?ver=20090102'></script>
<script type='text/javascript' src='http://billboardfamily.com/wp-content/plugins/slidedeck-lite-for-wordpress/lib/slidedeck.jquery.lite.pack.js?ver=1.3'></script>
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://billboardfamily.com/xmlrpc.php?rsd" />
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://billboardfamily.com/wp-includes/wlwmanifest.xml" /> 
<link rel='index' title='Billboard Family' href='http://billboardfamily.com' />
<link rel='prev' title='About Us' href='http://billboardfamily.com/?page_id=2' />
<link rel='next' title='Calendar' href='http://billboardfamily.com/?page_id=22' />
<meta name="generator" content="WordPress 3.0" />

<!-- All in One SEO Pack 1.6.12.1 by Michael Torbert of Semper Fi Web Design[330,374] -->
<link rel="canonical" href="http://billboardfamily.com/?page_id=4" />
<!-- /all in one seo pack -->

<!-- Start Of Script Generated By cforms v11.5 [Oliver Seidel | www.deliciousdays.com] -->
<link rel="stylesheet" type="text/css" href="http://billboardfamily.com/wp-content/plugins/cforms/styling/minimal.css" />

<script type="text/javascript" src="http://billboardfamily.com/wp-content/plugins/cforms/js/cforms.js"></script>
<!-- End Of Script Generated By cforms -->

<!-- begin Enhanced Search Box -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){var searchTextDefault = "";var searchBox = $("#s");var searchBoxMain = $("#content .s");searchBox.attr("value", searchTextDefault);searchBoxMain.attr("value", searchTextDefault);searchBoxMain.focus(searchFocus);searchBoxMain.blur(searchBlur);searchBox.focus(searchFocus);searchBox.blur(searchBlur);function searchFocus(){ $(this).addClass("active"); if($(this).attr("value") == searchTextDefault) $(this).attr("value", ""); };function searchBlur(){ $(this).removeClass("active"); if($(this).attr("value") == "") $(this).attr("value", searchTextDefault); };});
</script>
<!-- end Enhanced Search Box -->

<script type="text/javascript">var AKPC_IDS = "";</script>
	<link type="text/css" rel="stylesheet" href="http://billboardfamily.com/wp-content/plugins/wordpress-paypal-shopping-cart/wp_shopping_cart_style.css" />

	<script type="text/javascript">
	<!--
	//
	function ReadForm (obj1, tst) 
	{ 
	    // Read the user form
	    var i,j,pos;
	    val_total="";val_combo="";		
	
	    for (i=0; i<obj1.length; i++) 
	    {     
	        // run entire form
	        obj = obj1.elements[i];           // a form element
	
	        if (obj.type == "select-one") 
	        {   // just selects
	            if (obj.name == "quantity" ||
	                obj.name == "amount") continue;
		        pos = obj.selectedIndex;        // which option selected
		        val = obj.options[pos].value;   // selected value
		        val_combo = val_combo + "(" + val + ")";
	        }
	    }
		// Now summarize everything we have processed above
		val_total = obj1.product_tmp.value + val_combo;
		obj1.product.value = val_total;
	}
	//-->
	</script>

	<link rel="stylesheet" type="text/css" href="http://billboardfamily.com/wp-content/themes/mensa/assets/css/style.css" />
	<link rel="stylesheet" type="text/css" href="http://billboardfamily.com/wp-content/themes/mensa/assets/css/lightbox.css" />

	<!--[if lte IE 6]>
	<link rel="stylesheet" type="text/css" href="http://billboardfamily.com/wp-content/themes/mensa/assets/css/ie6.css" />
	<![endif]-->
	
	<script type="text/javascript" src="http://billboardfamily.com/wp-content/themes/mensa/assets/js/jquery-1.3.2.min.js"></script>
	<script type="text/javascript" src="http://billboardfamily.com/wp-content/themes/mensa/assets/js/jquery.cycle.all.min.js"></script>
	<script type="text/javascript" src="http://billboardfamily.com/wp-content/themes/mensa/assets/js/scripts.js"></script>
Just as the note says, you are loading (two different versions of) jquery three times. Try deleting the lower two. I'm assuming you have manually added these to your WP header.php file.
This is my entire header.php file....I don;t see those repeated in there:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">

<!-- BEGIN html head -->
<head profile="http://gmpg.org/xfn/11">

	<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
	<title><?php bloginfo('name'); ?> <?php wp_title(); ?></title>
	
	<?php if (function_exists('wp_enqueue_script') && function_exists('is_singular')) : ?>
	<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
	<?php endif; ?>
	<?php wp_head(); ?>

	<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_url'); ?>/assets/css/style.css" />
	<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_url'); ?>/assets/css/lightbox.css" />

	<!--[if lte IE 6]>
	<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_url'); ?>/assets/css/ie6.css" />
	<![endif]-->
	
	<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/assets/js/jquery-1.3.2.min.js"></script>
	<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/assets/js/jquery.cycle.all.min.js"></script>
	<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/assets/js/scripts.js"></script>

</head>
<!-- END html head -->

<body>

<!-- BEGIN wrapper -->
<div class="wrapper">

	<!-- BEGIN header -->
	<div id="header">
	
		<div class="search">
			<form action="<?php echo get_option('home'); ?>/">
				<input type="text" name="s" id="s" value="<?php the_search_query(); ?>" />
				<button type="submit">S</button>
			</form>
		</div>

		<div class="subscribe">



<a href="http://www.facebook.com/pages/Saint-Louis-MO/Billboard-Family/112172868831011?v=info&ref=mf" title="Follow Us on Facebook" target="_blank"><img alt="Follow Us on Facebook" src="<?php bloginfo('template_url'); ?>/assets/images/facebook_icon.png"/></a> 

			<a href="http://www.twitter.com/billboardfamily" title="Follow Us on Twitter" target="_blank"><img alt="Follow Us on Twitter" src="<?php bloginfo('template_url'); ?>/assets/images/twitter_icon.png"/></a>

			<a href="http://www.flickr.com/photos/billboardfamily/" title="See Our Flickr Photos" target="_blank"><img alt="See Our Flickr Photos" src="<?php bloginfo('template_url'); ?>/assets/images/flickr_icon.png"/></a>

			<a href="http://www.youtube.com/BillboardFamily" title="Check Out Our YouTube Videos" target="_blank"><img alt="Check Out Our YouTube Videos" src="<?php bloginfo('template_url'); ?>/assets/images/youtube_icon.png"/></a>

		<a href="http://feeds.feedburner.com/BillboardFamily" title="Subscribe to RSS" target="_blank"><img alt="Subscribe to RSS" src="<?php bloginfo('template_url'); ?>/assets/images/rss_icon.png"/></a>

<br />

			<img alt="Follow Us" src="<?php bloginfo('template_url'); ?>/assets/images/followus.png"/>

		</div>
		<div class="logo">
			<h1><a href="<?php echo get_option('home'); ?>"><?php bloginfo('name'); ?></a></h1>
		</div>


			
		<ul>
			
<?php wp_page_menu('include=2,4,22,169,24,26,29,31&sort_column=menu_order'); ?>

	
	
		</ul>


			<div class="break"></div>
		

<div class="purchase">

<a href="/?page_id=22" title="Purchase Your Day"><img alt="Purchase Your Day" src="<?php bloginfo('template_url'); ?>/assets/images/purchase.png"/></a>
		</div>
	<!-- END header -->
	
</div>
<!-- END wrapper -->




<!-- BEGIN wrapper -->
<div class="wrapper">

	<!-- BEGIN body -->
	<div id="body">
CarlMartin10 is offline   Reply With Quote
Old 07-22-2010, 01:23 PM   PM User | #4
SB65
Regular Coder

 
Join Date: Feb 2009
Location: West Yorkshire
Posts: 985
Thanks: 7
Thanked 220 Times in 218 Posts
SB65 is on a distinguished road
OK, well, there is a call to jquery, three up from the bottom of your </head>. Looks like the other two are coming from wp_head() and the Enhanced Search Box plugin.

According to http://wordpress.org/extend/plugins/...search-plugin/ you should be able to disable the jQuery inclusion via Admin to cope with this precise situation.

I'd suggest removing the call that is included explicitly in header.php and disabling within the Extended Search box, and give that a go.
SB65 is offline   Reply With Quote
Old 07-22-2010, 01:32 PM   PM User | #5
CarlMartin10
Regular Coder

 
Join Date: Apr 2010
Posts: 145
Thanks: 20
Thanked 0 Times in 0 Posts
CarlMartin10 is an unknown quantity at this point
Quote:
Originally Posted by SB65 View Post
OK, well, there is a call to jquery, three up from the bottom of your </head>. Looks like the other two are coming from wp_head() and the Enhanced Search Box plugin.

According to http://wordpress.org/extend/plugins/...search-plugin/ you should be able to disable the jQuery inclusion via Admin to cope with this precise situation.

I'd suggest removing the call that is included explicitly in header.php and disabling within the Extended Search box, and give that a go.

I disabled this in the plugin, that was simple. I then removed this line from my header.php file

<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/assets/js/jquery-1.3.2.min.js"></script>

i then checked the site....and the slideshow at the bottom of the page stopped working, and the original slider I am trying to get to work still did not work, so I'm not sure where to go from here.
CarlMartin10 is offline   Reply With Quote
Old 07-23-2010, 03:00 PM   PM User | #6
CarlMartin10
Regular Coder

 
Join Date: Apr 2010
Posts: 145
Thanks: 20
Thanked 0 Times in 0 Posts
CarlMartin10 is an unknown quantity at this point
Still need help.
CarlMartin10 is offline   Reply With Quote
Old 07-25-2010, 08:39 AM   PM User | #7
CarlMartin10
Regular Coder

 
Join Date: Apr 2010
Posts: 145
Thanks: 20
Thanked 0 Times in 0 Posts
CarlMartin10 is an unknown quantity at this point
Anyone know what I need to do to fix this???????
CarlMartin10 is offline   Reply With Quote
Old 07-26-2010, 12:12 PM   PM User | #8
CarlMartin10
Regular Coder

 
Join Date: Apr 2010
Posts: 145
Thanks: 20
Thanked 0 Times in 0 Posts
CarlMartin10 is an unknown quantity at this point
Anyone know what I need to do to fix this???????
CarlMartin10 is offline   Reply With Quote
Old 08-03-2010, 01:07 AM   PM User | #9
CarlMartin10
Regular Coder

 
Join Date: Apr 2010
Posts: 145
Thanks: 20
Thanked 0 Times in 0 Posts
CarlMartin10 is an unknown quantity at this point
This blows. I still do not have a fix for this. Anyone have any ideas?
__________________
Website: www.billboardfamily.com
Twitter: www.twitter.com/billboardfamily
Facebook Fan Page: www.facebook.com/BillboardFamily
Facebook (Carl): www.facebook.com/CarlMartin.BillboardFamily (admin note: sig should be <=4 lines)
CarlMartin10 is offline   Reply With Quote
Old 08-09-2010, 08:52 AM   PM User | #10
CarlMartin10
Regular Coder

 
Join Date: Apr 2010
Posts: 145
Thanks: 20
Thanked 0 Times in 0 Posts
CarlMartin10 is an unknown quantity at this point
Anyone have a clue on this???
__________________
Website: www.billboardfamily.com
Twitter: www.twitter.com/billboardfamily
Facebook Fan Page: www.facebook.com/BillboardFamily
Facebook (Carl): www.facebook.com/CarlMartin.BillboardFamily (admin note: sig should be <=4 lines)
CarlMartin10 is offline   Reply With Quote
Old 08-09-2010, 08:58 AM   PM User | #11
Philip M
Master Coder

 
Philip M's Avatar
 
Join Date: Jun 2002
Location: London, England
Posts: 9,466
Thanks: 113
Thanked 1,182 Times in 1,163 Posts
Philip M has a spectacular aura aboutPhilip M has a spectacular aura about
Quote:
Originally Posted by CarlMartin10 View Post
Anyone have a clue on this???
I think you can safely say that the answer is - no.

I contacted the creator, and they said "Once you get those changes made and jQuery running only once please let us know if you are still having problems."
Philip M is offline   Reply With Quote
Old 08-09-2010, 08:59 AM   PM User | #12
CarlMartin10
Regular Coder

 
Join Date: Apr 2010
Posts: 145
Thanks: 20
Thanked 0 Times in 0 Posts
CarlMartin10 is an unknown quantity at this point
Quote:
Originally Posted by Philip M View Post
I think you can safely say that the answer is - no.

I contacted the creator, and they said "Once you get those changes made and jQuery running only once please let us know if you are still having problems."
No doubt. I can not get JQuery to run only once...that's my issue. I have done that MANY times...they obviously can not fix the problem, so they are not contacting me back. I came here to find an expert in their absence. This sucks. Thanks.
__________________
Website: www.billboardfamily.com
Twitter: www.twitter.com/billboardfamily
Facebook Fan Page: www.facebook.com/BillboardFamily
Facebook (Carl): www.facebook.com/CarlMartin.BillboardFamily (admin note: sig should be <=4 lines)
CarlMartin10 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:56 AM.

Home - Contact Us - Archives - Link to CF - Resources - Top 

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.