Toggle row show & hide by clicking on image

Posted on 2013-06-23
Last Modified: 2013-06-23
I have the following code work fine when I click on the on the row and the row below shows or hides. But I would like to change to when the user clicks on the div tag with the arrow class instead.

You can see a working demo of this at

This is the jquery code that currently toggles row show and hide
        $("#table_id tr:odd").addClass("master");
        $("#table_id tr:not(.master)").hide();
        $("#table_id tr:first-child").show();
        $("#table_id tr.master").click(function(){
        }); //#table_id tr.master

Open in new window

And I have attached the 2 files that contain main code.

Thank you for any help in advance.
Question by:ACEAFTY
LVL 15

Expert Comment

ID: 39269725
Sorry did not got your question.
Do you mean to say if you click on arrow symbol then and then only toggle should take place right?
LVL 58

Accepted Solution

Gary earned 500 total points
ID: 39269730

Author Closing Comment

ID: 39269743
Thanks that worked perfectly.

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is a Lightbox? A Lightbox is the effect you see when you click, for example, an image and the screen fades out and up pops the same image but in its full size dimensions. There are lots of Lightbox effects for jQuery. Problem is they are a…
In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now