AJSwift
AJSwift

Reputation: 719

get element value using jquery

How do I get the value of the cell with class EventAddress using jquery?

<table cellpadding="10" class ="EventDetail">
    <tr>
        <td class="TableFields">Who Should Enroll?:</td>
        <td>Everyone 18 and older who would like to attend</td>
    </tr>
    <tr>
        <td class="TableFields">Location:</td>
        <td class="EventAddress">1300 Albany Street,Beech Grove ,IN</td>
    </tr>
</table>

Upvotes: 0

Views: 1351

Answers (2)

Christofer Eliasson
Christofer Eliasson

Reputation: 33865

If you with "value" mean the content of the td-element, then you could do:

$(".EventAddress").text();

Upvotes: 2

Ryan Casas
Ryan Casas

Reputation: 666

alert($('.EventAddress').html());

Basic example: http://jsfiddle.net/LMBsc/

Upvotes: 1

Related Questions