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 7491201
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T15:56:24+00:00 2026-05-29T15:56:24+00:00

i dont know how can I make it work. I explain it. I have

  • 0

i dont know how can I make it work. I explain it.

I have some html code with jquery script.

html

<div id="accordion">
    <h3><a class="0" href="#">aparamenta modular</a></h3>
    <div>
    <div class="cat_content_ex">
        t&eacute;rmicos, diferenciales, etc ...
    </div>
    </div>
    <h3><a class="1" href="#">iluminaci&oacute;n</a></h3>
    <div>
    <div class="cat_content_ex">
        luminarias std y sistemas de LED, etc ...
    </div>
    </div>
</div>
<div id="target"></div> 

script

<script type="text/javascript">
    $('h3 > a').live('click', function(){
        var currentClass = $(this).attr('class');
        alert ( currentClass, 'alert window');
        if(currentClass == '0') {
            <?php
                include "./connection_catalogs.php";                
                $SQL = "SELECT * FROM first_table";
                $result = mysql_query($SQL);
                while ($row = mysql_fetch_array($result)) { ?>
                    $('#target').html($(<?php echo "<p class='ctg_fab'>" .$row['fabricante']. " : " .$row['titulo']. " : <a href='" .$row['url']. "'>descarga</a> : tipo - " .$row['filetype']. "</p>";?>)); 
                }
        } else if(ctg == '1') {
            <?php
                include "./connection_catalogs.php";                
                $SQL = "SELECT * FROM second_table";
                $result = mysql_query($SQL);
                while ($row = mysql_fetch_array($result)) { ?>
                    $('#target').html($(<?php echo "<p class='ctg_fab'>" .$row['fabricante']. " : " .$row['titulo']. " : <a href='" .$row['url']. "'>descarga</a> : tipo - " .$row['filetype']. "</p>";?>)); 
                }
                }
            ?>
        }
});
</script>

user click in first header of accordion and show the content for sql table named ‘first_table’ by executing echo "<p class='ctg_fab'>" .$row['fabricante']. " : " .$row['titulo']. " : <a href='" .$row['url']. "'>descarga</a> : tipo - " .$row['filetype']. "</p>";

user click in second header of accordion and show the content for sql table named ‘second_table’ by executing echo "<p class='ctg_fab'>" .$row['fabricante']. " : " .$row['titulo']. " : <a href='" .$row['url']. "'>descarga</a> : tipo - " .$row['filetype']. "</p>";

  • 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-05-29T15:56:25+00:00Added an answer on May 29, 2026 at 3:56 pm

    $('#accordion.h3') selects an element with id="accordion" class="h3".

    Change it to $('#accordion > h3') which selects an <h3> element that has a parent element with id="accordion".

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am trying to get some data, but i dont know how can i
i have a question, been stuck for a while, i dont know how can
I don't know what's make wrong, my map can load, but the image on
Why in java (I dont know any other programming languages) can an identifier not
I've got a simple class Currency with overloaded operator<<. I don't know how can
From the question you can probably tell that I don't know much about code!
Does anyone know how to have dependency injection work with linq2sql. Heres my situation..
Well i need to make it so any user can have a foo.com/username in
I don't know if I can use regex for this, but I want to
Other than that I don't know if I can reproduce it now that it's

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.