Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

animated collapsible DIV script with WP CORE theme WordPress

  • SOLVED

hi

i'm using the CORE WP theme from themeforest and i would like to have a FAQ page that essentially allows the user to click on a question and reveal an answer - so I found this handy script from dynamicdrive.com:(http://www.dynamicdrive.com/dynamicindex17/animatedcollapse.htm) but I can't seem to get it to work on my site

I’m trying to add an animated collapse script to one of my pages (this one from dynamicdrive.com: http://bit.ly/HMq5l) – so that I can get my answers to automatically hide and then show when the user clicks on the ‘Question’

I have downloaded the js file and placed it in my Core/js folder

I’ve copied the relevant info to the header.php file and the associated body text to this page: http://bit.ly/tmFGel

but the script doesn’t seem to be working at all…

Have I added the script code to the correct place in my header.php file?
Do I need a new page template built to handle this?


Answers (2)

2011-11-08

Luis Cordova answers:

all is well the only problem
is the place of the js

http://carolinemcburney.co.uk/js/animatedcollapse.js

so you have not placed it under wp-content/themes/... so rather put that path there


Luis Cordova comments:

so change

this

<script type='text/javascript' src='/js/animatedcollapse.js'>


to

<script type='text/javascript' src='http://carolinemcburney.co.uk/wp-content/themes/Core/js/animatedcollapse.js'>


Luis Cordova comments:

so

<script type='text/javascript' src='/js/animatedcollapse.js'>


into


<script type='text/javascript' src='http://carolinemcburney.co.uk/wp-content/themes/Core/js/animatedcollapse.js'>


do not listen to about that it is something with jquery, because that is not the main problem

that could come after you solve this first


Luis Cordova comments:

notice I gave you the answer first :) !

thanks! hope that solves the problem, if you need further assistance you can PM me, and I will be right up


Luis Cordova comments:

ok working on it


Luis Cordova comments:

done


Luis Cordova comments:

working on the small detail


Luis Cordova comments:

ok now all done!

2011-11-08

Kannan C answers:

You have initiated the jquery library twice. Try remove the line from your header.php<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>


Kannan C comments:

Also this should <script type='text/javascript' src='/js/animatedcollapse.js'> to be changed to <script type='text/javascript' src='<?php bloginfo('template_directory'); ?>/js/animatedcollapse.js'>