Jquery - Toggle Image Src If Parent Class Is Clicked Hide/show
I have a program that is configured to hide/show table rows when a +/- icon is clicked. The functionality is working, however, I need to figure out a way to reset all hide/show ico
Solution 1:
You can find the img
nodes for the subcategories under the current one and then change their src
attr.
I've updated your jsfiddle: http://jsfiddle.net/nTyWv/12/
The code could be something like:
if(subs){
innerIcons = jQuery.find("a > img[id*="+tID+"sub]");
if (innerIcons) {
$(innerIcons).attr('src', s);
};
subs.hide();
}
Post a Comment for "Jquery - Toggle Image Src If Parent Class Is Clicked Hide/show"