0

I see the use of "%" a lot in this jQuery documenation.

Example:

$( "input" ).each( function( i, el ) {
var elem = $( el );
elem.val( elem.val() + "%" );
});

$( "input" ).val(function( index, value ) {
    return value + "%";
});

What is the meaning of, "%" in these contexts?

1 Answer 1

5

It does not have any special meaning. The examples merely append a character to a string. It could just as well be this:

$( "input" ).val(function( index, value ) {
    return value + "foobar";
});
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.