PHP Интерфейс pQuery\IQuery

Наследование: extends Countable
Показать файл Открыть проект

Открытые методы

Метод Описание
addClass ( string $classname ) : pquery\IQuery Adds the specified class(es) to each of the set of matched elements.
after ( string $content ) : pquery\IQuery Insert content, specified by the parameter, after each element in the set of matched elements.
append ( string $content ) : pquery\IQuery Insert content, specified by the parameter, to the end of each element in the set of matched elements.
attr ( string $name, null | string $value = null ) : string | pquery\IQuery Get the value of an attribute for the first element in the set of matched elements or set one or more attributes for every matched element.
before ( string $content ) : pquery\IQuery Insert content, specified by the parameter, before each element in the set of matched elements.
clear ( ) : IQuery; Remove all child nodes of the set of matched elements from the DOM.
hasClass ( string $classname ) Determine whether any of the matched elements are assigned the given class.
html ( string | null $value = null ) Get the HTML contents of the first element in the set of matched elements or set the HTML contents of every matched element.
prepend ( string $content ) Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.
prop ( string $name, null | string $value = null ) Get the value of a property for the first element in the set of matched elements or set one or more properties for every matched element.
remove ( null | string $selector = null ) Remove the set of matched elements from the DOM.
removeAttr ( string $name ) Remove an attribute from each element in the set of matched elements.
removeClass ( string $classname ) Remove a single class, multiple classes, or all classes from each element in the set of matched elements.
replaceWith ( string $content ) Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed.
tagName ( $value = null ) Returns the name of the element.
text ( null | string $value = null ) Get the combined text contents of each element in the set of matched elements, including their descendants, or set the text contents of the matched elements.
toggleClass ( string $classname, $switch = null ) Add or remove one or more classes from each element in the set of matched elements, depending on either the class’s presence or the value of the switch argument.
unwrap ( ) Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place.
val ( string | null $value = null ) Get the current value of the first element in the set of matched elements or set the value of every matched element.
wrap ( $wrapping_element ) Wrap an HTML structure around each element in the set of matched elements.
wrapInner ( $wrapping_element ) Wrap an HTML structure around the content of each element in the set of matched elements.

Описание методов

addClass() публичный Метод

Adds the specified class(es) to each of the set of matched elements.
public addClass ( string $classname ) : pquery\IQuery
$classname string The name of the class to add. You can add multiple classes by separating them with spaces.
Результат pquery\IQuery

after() публичный Метод

Insert content, specified by the parameter, after each element in the set of matched elements.
public after ( string $content ) : pquery\IQuery
$content string The content to add.
Результат pquery\IQuery

append() публичный Метод

Insert content, specified by the parameter, to the end of each element in the set of matched elements.
public append ( string $content ) : pquery\IQuery
$content string The content to append.
Результат pquery\IQuery

attr() публичный Метод

Get the value of an attribute for the first element in the set of matched elements or set one or more attributes for every matched element.
public attr ( string $name, null | string $value = null ) : string | pquery\IQuery
$name string The name of the attribute.
$value null | string The value to set or null to get the current attribute value.
Результат string | pquery\IQuery

before() публичный Метод

Insert content, specified by the parameter, before each element in the set of matched elements.
public before ( string $content ) : pquery\IQuery
$content string The content to add.
Результат pquery\IQuery

clear() публичный Метод

Remove all child nodes of the set of matched elements from the DOM.
public clear ( ) : IQuery;
Результат IQuery;

hasClass() публичный Метод

Determine whether any of the matched elements are assigned the given class.
public hasClass ( string $classname )
$classname string The name of the class to check.

html() публичный Метод

Get the HTML contents of the first element in the set of matched elements or set the HTML contents of every matched element.
public html ( string | null $value = null )
$value string | null The value to set.

prepend() публичный Метод

Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.
public prepend ( string $content )
$content string The content to add.

prop() публичный Метод

Get the value of a property for the first element in the set of matched elements or set one or more properties for every matched element.
public prop ( string $name, null | string $value = null )
$name string The name of the property. The currently supported properties are `tagname`, `selected`, and `checked`.
$value null | string The value to set or null to get the current property value.

remove() публичный Метод

Remove the set of matched elements from the DOM.
public remove ( null | string $selector = null )
$selector null | string A css query to filter the set of removed nodes.

removeAttr() публичный Метод

Remove an attribute from each element in the set of matched elements.
public removeAttr ( string $name )
$name string The name of the attribute to remove.

removeClass() публичный Метод

Remove a single class, multiple classes, or all classes from each element in the set of matched elements.
public removeClass ( string $classname )
$classname string The name of the class to remove.

replaceWith() публичный Метод

Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed.
public replaceWith ( string $content )
$content string The content that will replace the nodes.

tagName() публичный Метод

Returns the name of the element.
public tagName ( $value = null )

text() публичный Метод

Get the combined text contents of each element in the set of matched elements, including their descendants, or set the text contents of the matched elements.
public text ( null | string $value = null )
$value null | string A string to set the text or null to return the current text.

toggleClass() публичный Метод

Add or remove one or more classes from each element in the set of matched elements, depending on either the class’s presence or the value of the switch argument.
public toggleClass ( string $classname, $switch = null )
$classname string

unwrap() публичный Метод

Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place.
public unwrap ( )

val() публичный Метод

Get the current value of the first element in the set of matched elements or set the value of every matched element.
public val ( string | null $value = null )
$value string | null The new value of the element or null to return the current value.

wrap() публичный Метод

Wrap an HTML structure around each element in the set of matched elements.
public wrap ( $wrapping_element )

wrapInner() публичный Метод

Wrap an HTML structure around the content of each element in the set of matched elements.
public wrapInner ( $wrapping_element )