Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8593195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T23:56:01+00:00 2026-06-11T23:56:01+00:00

I want to remove this attribute class=validate[custom[card]] text-input on my input field named card

  • 0

I want to remove this attribute

class="validate[custom[card]] text-input"

on my input field named “card” when the radio containing the value “CreditCard” is unselected. This is the script for my radio box:

<script>
$(document).ready(function() {
    $("input[name$='sel']").click(function() {
        var test = $(this).val();

        $("div.desc").hide();
        $("#sel" + test).show();
    });
});
</script>

and the input field

<table><tr><td>

<p> Credit/Debit Card<lable  style="margin-right:1px;"></lable><input
type="radio" name="sel" id="sel"  value="CreditCard"
class="validate[required] radio-input" /> </p> 


<p> Paypal<input type="radio" id="sel"  name="sel" value="Paypal"   />
</p>


<p> Wire Transfer<input type="radio" id="sel"  name="sel"
value="WireTransfer"  /> </p>

<!====================================================================================> 
</td<td>

<!====================================================================================> 
<div id="selCreditCard" class="desc"> <label for="card"><strong>Card
Number<font color=red size=3> *</font></strong></label>
        <input name="card"   type="text"  id="card" value=""  style="width:85px;" class="validate[custom[card]] text-input" />
</div>
<!====================================================================================> 
<div id="selPaypal" class="desc" style="display:
none;margin-left:20px;margin-top:1px;margin-bottom:1px;"> paypal
</div>
<!====================================================================================> 
<div id="selWireTransfer" class="desc" style="display:
none;margin-left:20px;margin-top:0px;margin-bottom:-5px;"> wired
</div>
<!====================================================================================>
</td></tr></table>

and when the user unselects the radio, the attribute will be returned.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T23:56:03+00:00Added an answer on June 11, 2026 at 11:56 pm

    It seems that you are using jQuery. You want to remove the class attribute.

    In jquery there is the removeClass() method.

    So, you would do:

    $("input[name$='sel']").removeClass("validate text-input");
    

    Note: *validate[custom[card]]* is quite a strange name for a class. I suspect it is not a valid name for a class.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is what I want to do: Remove span nodes with a class of
I want to remove the class attribute from all elements that have an empty
I want to remove a cookie I set. If I do this by giving
I have this matrix of size 10000 by 1. I want to remove some
I have a string like this A. rahul VyAs and i want to remove
I want to do this: while list: for blah in blah: things list.remove(min(list)) Would
When I remove the DOCTYPE line this code works the way I want it
I want to draw a widget (in this example, a canvas) and then remove
if i remove a.three display block this shows up fine. However what i want
I want to remove the security permissions from a class I don't have access

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.