Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7958461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:25:35+00:00 2026-06-04T04:25:35+00:00

I have a small issue. I can’t seem to get the script to recognise

  • 0

I have a small issue. I can’t seem to get the script to recognise the h3 tag. I can’t just keep it as h3, I must add a class to it.

Markup:

<h3 class="jjheader">
    <?php echo $listitem->title ?>
</h3>

CSS:

#accordion h3.jjheader { 
    padding: 8px 8px 8px 8px; 
    font-weight: bold; 
    font-size: 12px; 
    color: #666666;
    margin-top: 5px; 
    cursor: pointer; 
    border: 1px solid #444444;
    border-radius: 8px;
    background: #151515;
}

It works fine if I don’t add a class to h3 and replace .jjheader with h3 in the script below, however with the class, it doesn’t.

Script:

<script type="text/javascript">
     var parentAccordion=new TINY.accordion.slider('parentAccordion'); 
     parentAccordion.init('accordion','.jjheader',0,1,'accordion-selected');
</script>

The accordion is based on the TinyAccordion JavaScript Accordion package from http://www.scriptiny.com/2009/03/accordion/

Can someone please point in the right direction?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T04:25:36+00:00Added an answer on June 4, 2026 at 4:25 am

    The script starts out with defining T$$, which is only ever used in init. That function finds an element by tag name, within a container. It could easily be modified to use class selectors, for instance:

    function T$$(e,p){
        if(e[0] == '.') {
           var matches = p.getElementsByClassName(e.substring(1));
           return matches.length == 0 ? null : matches[0];
        } else {
           return p.getElementsByTagName(e);
        }
    }
    

    The above code uses getElementsByClassName if the first character of the passed search string is a dot, indicating a css class selector; otherwise, it returns an element by tag name, as in the original source.

    You could of course extend this, by checking for a leading # and doing getElementById, for instance. If you are already running jQuery on your site, you could simplify it and utilize jQuery’s sizzle selector:

    function T$$(e,p) { return $(p).find(e); }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I seem to have a small issue with my script where I need to
can anyone help, i have a small issue, i have an interface and also
I am just new to programming in Unix and have a small issue that
I have run into a small issue in my program. I have a class
I have a small script that use urllib2 to get contents of a site,
I have a small issue with a bit of code I use to check
I have a small issue with a method that should save the text contained
I have a small issue(for lack of a better word) with MySQL db. I
i have a small issue which my text field insist to inhert the CSS
We're having a small issue and could use some help - we have the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.