Sk Asraf
Sk Asraf

Reputation: 45

what is the parameter defination of .removeClass() in jquery

in my case i am using .removeClass() but when using this then asking 4 parameter value

html code is

<div class="form-horizontal">
<div id="in-put" class="form-group has-success has-feedback">
    <label class="col-xs-2 control-label" for="txtStrongPassword">Income</label>
    <div class="col-xs-10">
        <div class="input-group">
            <span class="input-group-addon">$</span>
            <input type="text" id="txtIncome" class="form-control"
                   placeholder="Your annual income after taxes">
        </div>
        <span class="glyphicon glyphicon-ok form-control-feedback"></span>
        <span class="help-block">Success</span>
    </div>
</div>

and jquery asking parameters are-

enter image description here

i understand first two but remaining 2 parameter i can't understand what is this or how to use them.

I want to manipulate #in-put div

Upvotes: 0

Views: 144

Answers (3)

Tamas Kinsztler
Tamas Kinsztler

Reputation: 181

Default jQuery .removeClass() function has only one parameter, which is className.

Check documentation here: https://api.jquery.com/removeclass/


If you are using jQuery UI, then you have more parameters:

className: One or more class names (space separated) to be removed from the class attribute of each matched element.

duration: A string or number determining how long the animation will run.

easing: A string indicating which easing function to use for the transition.

complete: A function to call once the animation is complete, called once per matched element.

Check documentation here: http://api.jqueryui.com/removeClass/

Upvotes: 1

Bubble Hacker
Bubble Hacker

Reputation: 6723

className - The name of the class you will be removing (SomeClassName).

speed - A string or number determining how long the animation will run (Default is 400ms).

easing - A string indicating which easing function to use for the transition (Default is swing).

callback - A function to call once the animation is completed.

Upvotes: 0

gurvinder372
gurvinder372

Reputation: 68413

Check the doc

Last two parameters are - easing and complete (callback)

easing (default: swing)

A string indicating which easing function to use for the transition. complete

Complete:

A function to call once the animation is complete, called once per matched element.

Upvotes: 0

Related Questions