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

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-16-2011, 08:55 PM   PM User | #1
blakemcgillis
New to the CF scene

 
Join Date: Sep 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
blakemcgillis is an unknown quantity at this point
jQuery Conflict in WordPress

Hi everyone,

I'm currently porting a site to WordPress, and I'm having trouble getting the jQuery to work and I'd like to show it here to see if anyone knows what I'm doing wrong.

I've been searching the internet for quite a while now and I haven't found anything that has worked.

Here's the original site with the functioning jQuery: http://www.liwebpreview.com

Here's my site I'm putting together: http://www.blakemcgillis.com/wordpress/

Something worth pointing out is that on the original site, there are no errors with the jQuery; however, on the WordPress site, there is an error saying "$(".slider")._TMS is not a function"

Since you can't see some of the code in the View Source window, here's the code I have in the header.php:

Code:
<?php wp_enqueue_script('jquery'); ?>
<?php wp_head(); ?>

<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jquery-1.6.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/tms-0.3.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/tms_presets.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/backgroundPosition.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/atooltip.jquery.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/script.js"></script>
<!--[if lt IE 9]>
	<script type="text/javascript" src="/js/html5.js"></script>
	<style type="text/css">
		.box1 figure {behavior:url(/js/PIE.htc)}
	</style>
<![endif]-->
<!--[if lt IE 7]>
		<div style='clear:both;text-align:center;position:relative'>
			<a href="http://www.microsoft.com/windows/internet-explorer/default.aspx?ocid=ie6_countdown_bannercode"><img src="http://www.theie6countdown.com/images/upgrade.jpg" border="0" alt="" /></a>
		</div>
<![endif]-->

<script type="text/javascript">
jQuery(document).ready(function(){
	jQuery('.slider')._TMS({
		preset:'zabor',
		easing:'easeOutQuad',
		duration:800,
		pagination:true,
		banners:true,
		waitBannerAnimation:false,
		slideshow:6000,
		bannerShow:function(banner){
			banner
				.css({right:'-700px'})
				.stop()
				.animate({right:'0'},600, 'easeOutExpo')
		},
		bannerHide:function(banner){
			banner
				.stop()
				.animate({right:'-700'},600,'easeOutExpo')
		}
	})
	jQuery('.pagination li').hover(function(){
		if (!jQuery(this).hasClass('current')) {
			jQuery(this).find('a').stop().animate({backgroundPosition:'0 0'},600,'easeOutExpo', function(){jQuery(this).parent().css({backgroundPosition:'-20px 0'})});
		}
	},function(){
		if (!jQuery(this).hasClass('current')) {
			jQuery(this).css({backgroundPosition:'0 0'}).find('a').stop().animate({backgroundPosition:'-250px 0'},600,'easeOutExpo');
		}
	})
})
</script>
Thanks for any help.
blakemcgillis 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 01:54 AM.


Advertisement
Log in to turn off these ads.