Link to home
Start Free TrialLog in
Avatar of tonelm54
tonelm54

asked on

each inside class inside a named div

If wanted to access each 'clsTransactionDate'

in the following code:-
<div id="Transactions">
	<div class="TransRow">
		<div class="clsTransactionDate">Date</div>
		<div class="clsTransactionTrans">Transactions</div>
		<div class="clsTransactionCounts"></div>
		<div class="clsTransactionAmount">Amount</div>
		<div class="clsTransactionStatus">Status</div>
	</div>
</div>

Open in new window


I thought the following code would work:-
               $("#Transactions .clsTransactionDate").each( function() { alert($(this).text); });

Open in new window


But it doesn't seem to be able to see anything, what am I doing wrong?
Avatar of tonelm54
tonelm54

ASKER

The reason I want it to only pull from inside the div named is there are other divs on the page with the class name clsTransactionDate, but I only want the each function to return those inside the named div Transactions.

I hope that explains things a bit better, and you don't think Im going mad :-)
ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe 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