Question : Help targeting an image within an anchor in jquery

For some reason I have issues figuring out jQuery selectors sometimes and was wondering if someone could help me with this simple problem.

I want to do a very simple image switch from a plus to a minus sign when the link is clicked and the row below is revealed. It's always going to be the image within the link that gets changed out. Here's my code:

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
		$(document).ready(function(){	
			$('.expand').click(function() {
			  if( $(this).parents("tr").next("tr").hasClass('hidden')) { 
			 	 	$(this).parents("tr").next("tr").removeClass('hidden');
			  }	else { 
			  		$(this).parents("tr").next("tr").addClass('hidden');
			  } 
			  return false;
			});
		});
		
		<table cellspacing="0" cellpadding="4" border="0" width="630">
			<tr valign="top">
				<td width="10"><input type="radio" value="262" name="powervac"></td>
				<td><a class="expand" href="#">Model 12F - Triple Bag<img border="0" align="absbottom" name="Model12F-TripleBag" src="images/plus.gif"></a></td> 
				<td align="right"><span class="add_to"><i>add&nbsp;$1,853.00</i></span></td>
			</tr>
			<tr class="hidden" id="Model 12F - Triple Bag">
				<td colspan="3">
					<table cellspacing="0" cellpadding="1" border="0" width="100%">
					<tr valign="top" rel="">
						<td><input type="checkbox" checked="" value="262-503587" name="vacoptions[]"></td>
						<td width="180"><b><span style="font-size: 10px;">Mount Kits</span></b></td>
						<td><span style="font-size: 10px;">Triple Bags Model 12F Mount Kit for 700 Series </span></td><td align="right" width="30"><span style="color: rgb(51, 102, 153); font-size: 10px;"><i>$170</i></span></td></tr><tr valign="top" rel=""><td><input type="checkbox" checked="" value="262-503193" name="vacoptions[]"></td><td width="180"><b><span style="font-size: 10px;">Collectors</span></b></td><td><span style="font-size: 10px;">Model 12F Triple Bag Assembly, without mount </span></td><td align="right" width="30"><span style="color: rgb(51, 102, 153); font-size: 10px;"><i>$770</i></span></td></tr><tr valign="top" rel=""><td><input type="checkbox" checked="" value="262-503174" name="vacoptions[]"></td><td width="180"><b><span style="font-size: 10px;">Vac Assembly Kits</span></b></td><td><span style="font-size: 10px;">For 3472 Decks, Vac Assembly Drive 372 </span></td><td align="right" width="30"><span style="color: rgb(51, 102, 153); font-size: 10px;"><i>$885</i></span></td></tr><tr valign="top" rel=""><td><input type="checkbox" checked="" value="262-604327" name="vacoptions[]"></td><td width="180"><b><span style="font-size: 10px;">Misc. Vac System Components</span></b></td><td><span style="font-size: 10px;">Exhaust Deflector Kit for 700 Series Kohler engine models with all cloth-bag collection systems </span></td><td align="right" width="30"><span style="color: rgb(51, 102, 153); font-size: 10px;"><i>$28</i></span></td></tr></tbody></table></td></tr><tr valign="top" rel=""><td width="10"><input type="radio" value="265" name="powervac"></td><td><a class="expand" href="#">Model 15 - Lever - Actuator<img border="0" align="absbottom" name="Model15-Lever-Actuator" src="images/plus.gif"></a></td><td align="right"><span class="add_to"><i>add&nbsp;$2,044.00</i></span></td></tr>
					<tr class="hidden" id="Model 15 - Lever - Actuator">
						<td colspan="3">
							<table cellspacing="0" cellpadding="1" border="0" width="100%">
								<tr valign="top"><td><input type="checkbox" checked value="265-503581" name="vacoptions[]"></td><td width="180">Mount Kits</td><td>Model 15 Mount Kit for 700 &amp; 900 Series</td><td align="right" width="30"><i>$105</i></td></tr>
								<tr valign="top" rel=""><td><input type="checkbox" checked value="265-503216" name="vacoptions[]"></td><td width="180">Collectors</td><td>Model 15 Lever-Actuated Hopper, without mount, for 620T, 700 &amp; 900 Series</td><td align="right" width="30">$965</td></tr>
							</table>
						</td>
					</tr>
					</table>
			</table>

Answer : Help targeting an image within an anchor in jquery

Sounds like you might want to look at jquery TOGGLE
Random Solutions  
 
programming4us programming4us