ACEAFTY
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
And I have attached the 2 files that contain main code.
Thank you for any help in advance.
index.php
loaddata.php
style.css
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
And I have attached the 2 files that contain main code.
Thank you for any help in advance.
index.php
loaddata.php
style.css
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks that worked perfectly.
Do you mean to say if you click on arrow symbol then and then only toggle should take place right?