IT. Expert System.

JQUERY

prop()


Description

The .prop() method sets or returns property values of selected elements.


Return Property Value

Get the value of a property for the first element in the set of matched elements.


v1.6

This method has the form:

.prop(propertyName )
Parameter Description
propertyName Specifies the name of the property to get

Return Value

This form returns a String object.


Set Property/Value

Set one or more properties for the set of matched elements.

v1.6

This method has the alternate form:

.prop(propertyName,value)
Parameter Description
propertyName Specifies the name of the property
value Specifies the value to set for the property

Return Value

This form returns a jQuery object.


Set Multiple Attribute/Value Pairs

Set one or more properties for the set of matched elements.

v1.6

This method has the alternate form:

.prop(map)
Parameter Description
map Specifies a map of property-value pairs to set

Return Value

This form returns a jQuery object.


Set Attribute/Value Using a Function

Using a function to set one or more properties for the set of matched elements.

v1.6

This method has the alternate form:

.prop(propertyName,function(index,oldPropertyValue))
Parameter Description
propertyName Specifies the name of the property
function(index,
oldPropertyValue)
Specifies a function that returns the property value to set.
  • index - Receives the index position of the selector
  • oldvalue - Receives the current property value of the selector

Return Value

This form returns a jQuery object.


Examples

Set the width attribute of an image:

$("button").click(function(){
  $("img").prop("width","150");
});


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 181 / 159131505. Delta: 0.00360 с