1

I'm working with a site developed by an external developer. I've noticed the code they use for accordions only supports a fixed number of accordion items per page (even though their CMS can create an unlimited amount of items marked as being displayed accordion-style). I'm trying to tidy this up to avoid confusing my colleagues later down the line.

I'm trying to add a standard Mootools more accordion, but when I add it to a page I get the error below:

Uncaught TypeError: Property 'container' of object # is not a function mootools-core-1.4.5-full-compat.js:683

Here's an example page - the links in tags below 'Session details - Click the titles below for more information on each session.' should all be accordions.

I'm calling this code at the bottom of my page from http://www.aua.ac.uk/scripts/accordion.js:

window.addEvent('domready', function(){
    new Fx.Accordion($$('#sub_left .accordion_heading'),$$('#sub_left .accordion_holder'), {
        opacity: 0,
        display: -1,
        alwaysHide: true
    });
});

Using these versions of Mootools (referenced at the top of the page in the head):

mootools-core-1.4.5-full-compat.js and mootools-more-1.4.0.1.js

Here is a fiddle using those verions of mootools, a portion of the HTML from my page, and the same accordion code - and it's all working. I think there is a conflict somewhere on my full page but I can't work out where.

http://jsfiddle.net/bcfu2/5/

Does anyone have any idea how to either fix this, or where to start debugging it - other than removing code/links to JS files one by one?


the array should be a string

$string = implode("','", $array);
$sql = "SELECT * FROM `product` WHERE `product`.`Productcode` IN ('".$string."') ";

quotes not needed if the productcode is an integer

4

1 に答える 1