Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Aug 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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().

  • #2
    New to the CF scene
    Join Date
    Aug 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    OK, I was able to get the same result using the following in prototype:

    Code:
    $(document.body).addClassName($(this).innerHTML);
    Thanks.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •