SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Mar 2008
    Location
    Atlanta, GA
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Accordian not a constructor?

    hello everyone!

    I am having some problems getting a simple accoridan to work.
    I get this in the error console:
    Error: Accordian is not a constructor
    Source File: file:///Macintosh%20HD/Users/Aubrey/Desktop/test_2way/s/global.js
    Line: 122


    Here is 122:
    Code JavaScript:
    //accordion
    function myAccordian(){
    var Accordian = new Accordian('basic-accordian',5,'header_highlight');
    }

    Here is where I call it in my HTML:
    Code JavaScript:
    <script type="text/javascript" src="accordian_src.js"></script>
    <script type="text/javascript">
    window.name = "iamaubrey.com";
    window.onload = 
    function(){
    test();
    myAccordian();
    }
    function MM_openBrWindow(theURL,winName,features) { //v2.0
      window.open(theURL,winName,features);
    }
     
    hs.graphicsDir = 's/i/hs/';
    hs.outlineType = 'rounded-white';
    </script>

    I got the accordian script from here:
    http://www.dezinerfolio.com/2007/07/...pt-accordions/

    Please visit:
    http://www.iamaubrey.com/315_5/index.html

    if you need to see the site in all of it's error-burdened goodness...


    Thanks in advance!

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    The original site has an object constructor called Accordian that you also need which is contained in accordian.pack.js from the accordian page.

    Your test page tells me that it can't find the accordian_src.js file
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Member
    Join Date
    Mar 2008
    Location
    Atlanta, GA
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    sorry...

    Awesome, great timing! Thank you!

    Ok, so... Good call, I didn't check activity monitor.

    I re-upped the index.html with the correct path, but still have the error.

    I am using the uncompressed version for more control of the animation properties (speed, time etc...).

    Thanks for looking into this.

    Aubrey


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •