Link to home
Start Free TrialLog in
Avatar of ACEAFTY
ACEAFTYFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Toggle row show & hide by clicking on image

Hi
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 http://www.afthab.co.uk/test/

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(){
            $(this).next("tr").toggle();
            $(this).find(".arrow").toggleClass("up");
        }); //#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.
index.php
loaddata.php
style.css
Avatar of Insoftservice inso
Insoftservice inso
Flag of India image

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?
ASKER CERTIFIED SOLUTION
Avatar of Gary
Gary
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ACEAFTY

ASKER

Thanks that worked perfectly.