Link to home
Start Free TrialLog in
Avatar of Evan Cutler
Evan CutlerFlag for United States of America

asked on

div clicks jquery

greetings...
I have a series of divs with the same class...

<div class="divclass">some text1</div>
<div class="divclass">some text2</div>
<div class="divclass">some text3</div>
<div class="divclass">some text4</div>

if I did a $('.divclass').click(function () {
     alert ( $('.divclass').text);
})

it gives me all of the divs...how can I tweak the javascript/jquery alone to give me the text of the one div that's clicked?

Thanks
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
Avatar of Evan Cutler

ASKER

and that's why you are the genius.... :)

Thanks.