www.webdeveloper.com
Results 1 to 3 of 3

Thread: How can I change class of all inputs by rowid(FormsRow) using Jquery?

  1. #1
    Join Date
    Feb 2009
    Posts
    93

    How can I change class of all inputs by rowid(FormsRow) using Jquery?

    How can I remove all inputs class from "Button" and assign "BigButton" class to all inputs by rowid(FormsRow) using Jquery. My table has 20 rows but I only want to change the following row's inputs tag's class:
    Code:
    <tr name="" id="FormsRow">
    <td name="" id="" colspan="2"><input type="button" value="1st Letter" class="Button"></td>
    <td name="" id="" colspan="2"><input type="button" value="2nd Letter" class="Button"></td>
    </tr>
    Thanks

  2. #2
    Join Date
    Jul 2011
    Posts
    127
    This should work:
    Code:
    $("#FormsRow input[class='Button']").removeClass("Button").addClass("BigButton");

  3. #3
    Join Date
    Feb 2009
    Posts
    93
    Thank you. It works.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles