Jump to content


Photo

jQuery?


This topic has been archived. This means that you cannot reply to this topic.
5 replies to this topic

#1 gunn4r

gunn4r

    Member

  • Members
  • PipPip
  • 13 posts

Posted 14 June 2010 - 06:13 AM

Any idea why this script:
 <script type="text/javascript">
	$(document).ready(function()
	{
	  $(".resSub").hide();
	  $(".resHead").click(function()
	  {
	    $(this).next(".resSub").slideToggle(600);
	  });
	});
	</script>

Wouldn't be working on this page: http://beta.wtcut.com/asia

The script works fine outside of wordpress.

What it does is Hides the content of the div's with the class resSub, and shows them when you click the header above the corresponding div. So for that page, you would click on China, and the links would show.

#2 cmunns

cmunns

    Advocate

  • Members

  • 6537 posts

Posted 14 June 2010 - 03:02 PM

If you've set up in an identical fashion outside of WP and it worked then you may have a plug-in conflict. We might have gone through this before, but plug-ins really can be both amazing and nightmares at the same time. Do you have any plugins that rely on similar jquery?

#3 gunn4r

gunn4r

    Member

  • Members
  • PipPip
  • 13 posts

Posted 14 June 2010 - 05:40 PM

I've got two plugins that use some jquery, a shadowbox plugin and neg gen gallery... disabling both doesn't solve the problem however. You think it's because a plugin is calling another version (or a duplicate) of the jquery library? The shadowbox effects work fine though.

#4 cmunns

cmunns

    Advocate

  • Members

  • 6537 posts

Posted 15 June 2010 - 04:22 PM

It's hard for me to say what causes a problem like this, but plug-ins are some of the usual suspects. Are you sure that the jquery is being loaded onto the page? I tried looking, but got a 404 on the page you provided

#5 gunnargabrielsongmailcom

gunnargabrielsongmailcom

    Member

  • Members
  • PipPip
  • 18 posts

Posted 21 June 2010 - 03:43 AM

Yes sorry for any of my posts on here now the beta from the URL can be dropped... so in this case: http://www.wtcut.com/asia

#6 cmunns

cmunns

    Advocate

  • Members

  • 6537 posts

Posted 21 June 2010 - 05:16 PM

Have you tried asking this question on a jquery forum? That might be a better place. The only thing I can think of is that the jquery's not being loaded.