Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-26-2009, 09:47 AM   PM User | #1
khawar
New to the CF scene

 
Join Date: Aug 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
khawar is an unknown quantity at this point
Prototype equivalent to JQuery $(this).text()

Hi,

I am trying to covert a JQuery script to prototype. Here is the line I am having difficulty with:

$('body').removeAttr('class').addClass($(this).text());

I am unable to find equivalent to $(this).text().
khawar is offline   Reply With Quote
Old 08-26-2009, 02:34 PM   PM User | #2
khawar
New to the CF scene

 
Join Date: Aug 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
khawar is an unknown quantity at this point
OK, I was able to get the same result using the following in prototype:

Code:
$(document.body).addClassName($(this).innerHTML);
Thanks.
khawar is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 09:51 PM.


Advertisement
Log in to turn off these ads.