Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
JQUERY: readout content of span within current table
Old 11-05-2009, 09:19 AM JQUERY: readout content of span within current table
Skilled Talker

Posts: 83
Trades: 0
hello,

I have the following setup:

jquery:
HTML Code:
$('.taak').click(function(){
   lalala = $(this).children("span").html();
   alert(lalala);
});
html:
HTML Code:
<table class="taak"><tr><td>
<span>mycontent</span>
</td></tr></table>
I would like to get the value of the span element within the table. Currently the alert says "null".

What is wrong?

thanks!

Matt

Last edited by killerwhale65; 11-05-2009 at 09:22 AM..
killerwhale65 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-05-2009, 02:31 PM Re: JQUERY: readout content of span within current table
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
Code:
lalala = $(this).find("span").html();
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 11-05-2009, 02:34 PM Re: JQUERY: readout content of span within current table
Skilled Talker

Posts: 83
Trades: 0
thank you very much!
killerwhale65 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to JQUERY: readout content of span within current table
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.17121 seconds with 12 queries