troubleshooting Question

issue with jquery not executing a function

Avatar of Perumal RM
Perumal RM asked on
13 Comments1 Solution483 ViewsLast Modified:
I have to develop a faq section, where users search for contents. When one searches for contents, it brings back some results and wanted to show and hide certain div.

When you enter a search term "man" this should bring you back with two results.

each results have the following structure.

<h5 class="plus" id="h5code">title of the faq</h5>
<div "display:none">description of faq</div>

I have written code for executing while some one clicks on h5.

      $('h5').on('click',function(e) {
            //$(this).toggleClass('minus plus').next().toggle('slow', 'swing');
            //return false;
            alert ('hai');

      $('#results h5 minus').next().show();
      $('#results h5 plus').next().hide();

Not sure why its not getting into the function.

So question is can you guys help me in 2 things.
1. Why is my function not executed?
2. How can i show and hide the following div, which will have the description of the faq?
Join our community to see this answer!
Unlock 1 Answer and 13 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 13 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros