mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 21:43:18 +00:00
508 lines
30 KiB
HTML
508 lines
30 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
<html xmlns:yui="http://yuilibrary.com/rdf/1.0/yui.rdf#">
|
|
<head>
|
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
|
<title>API: selector YAHOO.util.Selector (YUI Library)</title>
|
|
|
|
<link rel="stylesheet" type="text/css" href="assets/reset-fonts-grids-min.css" />
|
|
<link rel="stylesheet" type="text/css" href="assets/api.css" />
|
|
|
|
<script type="text/javascript" src="assets/api-js"></script>
|
|
<script type="text/javascript" src="assets/ac-js"></script>
|
|
</head>
|
|
|
|
<body id="yahoo-com">
|
|
|
|
<div id="doc3" class="yui-t2">
|
|
<div id="hd">
|
|
<h1><a href="http://developer.yahoo.com/yui/" title="Yahoo! UI Library">Yahoo! UI Library</a></h1>
|
|
<h3>Selector Utility <span class="subtitle">2.8.2r1</span></h3>
|
|
<a href="./index.html" title="Yahoo! UI Library">Yahoo! UI Library</a>
|
|
> <a href="./module_selector.html" title="selector">selector</a>
|
|
> YAHOO.util.Selector
|
|
|
|
<form onsubmit="return false">
|
|
<div id="propertysearch">
|
|
Search: <input autocomplete="off" id="searchinput" />
|
|
<div id="searchresults">
|
|
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
<form action="#" name="yui-classopts-form" method="get" id="yui-classopts-form">
|
|
<fieldset>
|
|
<legend>Filters</legend>
|
|
<span class="classopts"><input type="checkbox" name="show_private" id="show_private" /> <label for="show_private">Show Private</label></span>
|
|
<span class="classopts"><input type="checkbox" name="show_protected" id="show_protected" /> <label for="show_protected">Show Protected</label></span>
|
|
<span class="classopts"><input type="checkbox" name="show_deprecated" id="show_deprecated" /> <label for="show_deprecated">Show Deprecated</label></span>
|
|
</fieldset>
|
|
</form>
|
|
|
|
<h2>
|
|
|
|
|
|
<code>static</code>
|
|
|
|
Class <b property="yui:name">YAHOO.util.Selector</b>
|
|
<span class="extends">
|
|
</span>
|
|
|
|
</h2>
|
|
<!-- class tree goes here -->
|
|
|
|
|
|
|
|
|
|
<div class="summary description" property="yui:description">
|
|
Provides helper methods for collecting and filtering DOM elements.
|
|
</div>
|
|
|
|
|
|
<div rel="yui:properties" resource="#properties">
|
|
<div class="section field details">
|
|
<h3 id="properties">Properties</h3>
|
|
<div class="content">
|
|
<div class="" rel="yui:property" resource="#property_attrAliases">
|
|
<h4><a name="property_attrAliases" property="yui:name">attrAliases</a>
|
|
- <code><span property="yui:type">object</span></code>
|
|
</h4>
|
|
<div class="detail">
|
|
<div class="description" property="yui:description">
|
|
Mapping of attributes to aliases, normally to work around HTMLAttributes
|
|
that conflict with JS reserved words.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<hr />
|
|
</div>
|
|
<div class="" rel="yui:property" resource="#property_document">
|
|
<h4><a name="property_document" property="yui:name">document</a>
|
|
- <code><span property="yui:type">object</span></code>
|
|
</h4>
|
|
<div class="detail">
|
|
<div class="description" property="yui:description">
|
|
Default document for use queries
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="default" property="yui:defaultValue">
|
|
Default Value: window.document
|
|
</div>
|
|
|
|
|
|
<hr />
|
|
</div>
|
|
<div class="" rel="yui:property" resource="#property_operators">
|
|
<h4><a name="property_operators" property="yui:name">operators</a>
|
|
- <code><span property="yui:type">object</span></code>
|
|
</h4>
|
|
<div class="detail">
|
|
<div class="description" property="yui:description">
|
|
List of operators and corresponding boolean functions.
|
|
These functions are passed the attribute and the current node's value of the attribute.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<hr />
|
|
</div>
|
|
<div class="" rel="yui:property" resource="#property_pseudos">
|
|
<h4><a name="property_pseudos" property="yui:name">pseudos</a>
|
|
- <code><span property="yui:type">object</span></code>
|
|
</h4>
|
|
<div class="detail">
|
|
<div class="description" property="yui:description">
|
|
List of pseudo-classes and corresponding boolean functions.
|
|
These functions are called with the current node, and any value that was parsed with the pseudo regex.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<hr />
|
|
</div>
|
|
<div class="" rel="yui:property" resource="#property_shorthand">
|
|
<h4><a name="property_shorthand" property="yui:name">shorthand</a>
|
|
- <code><span property="yui:type">object</span></code>
|
|
</h4>
|
|
<div class="detail">
|
|
<div class="description" property="yui:description">
|
|
Mapping of shorthand tokens to corresponding attribute selector
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<hr />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div rel="yui:methods" resource="#methods">
|
|
<div class="section method details">
|
|
<h3 id="methods">Methods</h3>
|
|
<div class="content">
|
|
<div class="" rel="yui:method" resource="#method__tokenize">
|
|
<h4>
|
|
<a name="method__tokenize">_tokenize</a></h4>
|
|
<div class="detail" >
|
|
<code>
|
|
|
|
|
|
|
|
void
|
|
<strong property="yui:name">_tokenize</strong>
|
|
(
|
|
)
|
|
</code>
|
|
|
|
<div class="description" property="yui:description">
|
|
Break selector into token units per simple selector.
|
|
Combinator is attached to left-hand selector.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
<div class="" rel="yui:method" resource="#method_filter">
|
|
<h4>
|
|
<a name="method_filter">filter</a></h4>
|
|
<div class="detail" >
|
|
<code>
|
|
|
|
static
|
|
|
|
array
|
|
<strong property="yui:name">filter</strong>
|
|
(
|
|
|
|
|
|
nodes
|
|
|
|
|
|
,
|
|
selector
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description" property="yui:description">
|
|
Filters a set of nodes based on a given CSS selector.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl rel="yui:parameters">
|
|
<dt>Parameters:</dt>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">nodes</span>
|
|
<<span property="yui:type">array</span>>
|
|
</code>
|
|
<span property="yui:description"> A set of nodes/ids to filter.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">selector</span>
|
|
<<span property="yui:type">string</span>>
|
|
</code>
|
|
<span property="yui:description"> The selector used to test each node.</span>
|
|
</dd>
|
|
</dl>
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code property="yui:return">
|
|
array
|
|
</code></dt>
|
|
<dd property="yui:returnInfo">An array of nodes from the supplied array that match the given selector.</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
<div class="" rel="yui:method" resource="#method_query">
|
|
<h4>
|
|
<a name="method_query">query</a></h4>
|
|
<div class="detail" >
|
|
<code>
|
|
|
|
static
|
|
|
|
Array
|
|
<strong property="yui:name">query</strong>
|
|
(
|
|
|
|
|
|
selector
|
|
|
|
|
|
,
|
|
root
|
|
|
|
|
|
,
|
|
firstOnly
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description" property="yui:description">
|
|
Retrieves a set of nodes based on a given CSS selector.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl rel="yui:parameters">
|
|
<dt>Parameters:</dt>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">selector</span>
|
|
<<span property="yui:type">string</span>>
|
|
</code>
|
|
<span property="yui:description"> The CSS Selector to test the node against.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">root</span>
|
|
<<span property="yui:type">HTMLElement | String</span>>
|
|
</code>
|
|
<span property="yui:description"> optional An id or HTMLElement to start the query from. Defaults to Selector.document.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">firstOnly</span>
|
|
<<span property="yui:type">Boolean</span>>
|
|
</code>
|
|
<span property="yui:description"> optional Whether or not to return only the first match.</span>
|
|
</dd>
|
|
</dl>
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code property="yui:return">
|
|
Array
|
|
</code></dt>
|
|
<dd property="yui:returnInfo">An array of nodes that match the given selector.</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
<div class="" rel="yui:method" resource="#method_test">
|
|
<h4>
|
|
<a name="method_test">test</a></h4>
|
|
<div class="detail" >
|
|
<code>
|
|
|
|
static
|
|
|
|
boolean
|
|
<strong property="yui:name">test</strong>
|
|
(
|
|
|
|
|
|
node
|
|
|
|
|
|
,
|
|
selector
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description" property="yui:description">
|
|
Test if the supplied node matches the supplied selector.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl rel="yui:parameters">
|
|
<dt>Parameters:</dt>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">node</span>
|
|
<<span property="yui:type">HTMLElement | String</span>>
|
|
</code>
|
|
<span property="yui:description"> An id or node reference to the HTMLElement being tested.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">selector</span>
|
|
<<span property="yui:type">string</span>>
|
|
</code>
|
|
<span property="yui:description"> The CSS Selector to test the node against.</span>
|
|
</dd>
|
|
</dl>
|
|
|
|
<dl>
|
|
<dt>Returns:
|
|
<code property="yui:return">
|
|
boolean
|
|
</code></dt>
|
|
<dd property="yui:returnInfo">Whether or not the node matches the selector.</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div rel="yui:events" resource="#events">
|
|
|
|
|
|
</div>
|
|
|
|
<div rel="yui:attributes" resource="#configattributes">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="yui-b">
|
|
<div class="nav">
|
|
|
|
<div id="moduleList" class="module">
|
|
<h4>Modules</h4>
|
|
<ul class="content">
|
|
<li class=""><a href="module_animation.html" title="animation">animation</a></li>
|
|
<li class=""><a href="module_autocomplete.html" title="autocomplete">autocomplete</a></li>
|
|
<li class=""><a href="module_button.html" title="button">button</a></li>
|
|
<li class=""><a href="module_calendar.html" title="calendar">calendar</a></li>
|
|
<li class=""><a href="module_carousel.html" title="carousel">carousel</a></li>
|
|
<li class=""><a href="module_charts.html" title="charts">charts</a></li>
|
|
<li class=""><a href="module_colorpicker.html" title="colorpicker">colorpicker</a></li>
|
|
<li class=""><a href="module_connection.html" title="connection">connection</a></li>
|
|
<li class=""><a href="module_container.html" title="container">container</a></li>
|
|
<li class=""><a href="module_cookie.html" title="cookie">cookie</a></li>
|
|
<li class=""><a href="module_datasource.html" title="datasource">datasource</a></li>
|
|
<li class=""><a href="module_datatable.html" title="datatable">datatable</a></li>
|
|
<li class=""><a href="module_datemath.html" title="datemath">datemath</a></li>
|
|
<li class=""><a href="module_dom.html" title="dom">dom</a></li>
|
|
<li class=""><a href="module_dragdrop.html" title="dragdrop">dragdrop</a></li>
|
|
<li class=""><a href="module_editor.html" title="editor">editor</a></li>
|
|
<li class=""><a href="module_element.html" title="element">element</a></li>
|
|
<li class=""><a href="module_element-delegate.html" title="element-delegate">element-delegate</a></li>
|
|
<li class=""><a href="module_event.html" title="event">event</a></li>
|
|
<li class=""><a href="module_event-delegate.html" title="event-delegate">event-delegate</a></li>
|
|
<li class=""><a href="module_event-mouseenter.html" title="event-mouseenter">event-mouseenter</a></li>
|
|
<li class=""><a href="module_event-simulate.html" title="event-simulate">event-simulate</a></li>
|
|
<li class=""><a href="module_get.html" title="get">get</a></li>
|
|
<li class=""><a href="module_history.html" title="history">history</a></li>
|
|
<li class=""><a href="module_imagecropper.html" title="imagecropper">imagecropper</a></li>
|
|
<li class=""><a href="module_imageloader.html" title="imageloader">imageloader</a></li>
|
|
<li class=""><a href="module_json.html" title="json">json</a></li>
|
|
<li class=""><a href="module_layout.html" title="layout">layout</a></li>
|
|
<li class=""><a href="module_logger.html" title="logger">logger</a></li>
|
|
<li class=""><a href="module_menu.html" title="menu">menu</a></li>
|
|
<li class=""><a href="module_paginator.html" title="paginator">paginator</a></li>
|
|
<li class=""><a href="module_profiler.html" title="profiler">profiler</a></li>
|
|
<li class=""><a href="module_profilerviewer.html" title="profilerviewer">profilerviewer</a></li>
|
|
<li class=""><a href="module_progressbar.html" title="progressbar">progressbar</a></li>
|
|
<li class=""><a href="module_resize.html" title="resize">resize</a></li>
|
|
<li class="selected"><a href="module_selector.html" title="selector">selector</a></li>
|
|
<li class=""><a href="module_slider.html" title="slider">slider</a></li>
|
|
<li class=""><a href="module_storage.html" title="Storage">Storage</a></li>
|
|
<li class=""><a href="module_stylesheet.html" title="stylesheet">stylesheet</a></li>
|
|
<li class=""><a href="module_swf.html" title="swf">swf</a></li>
|
|
<li class=""><a href="module_swfdetect.html" title="swfdetect">swfdetect</a></li>
|
|
<li class=""><a href="module_swfstore.html" title="swfstore">swfstore</a></li>
|
|
<li class=""><a href="module_tabview.html" title="tabview">tabview</a></li>
|
|
<li class=""><a href="module_treeview.html" title="treeview">treeview</a></li>
|
|
<li class=""><a href="module_uploader.html" title="uploader">uploader</a></li>
|
|
<li class=""><a href="module_yahoo.html" title="yahoo">yahoo</a></li>
|
|
<li class=""><a href="module_yuiloader.html" title="yuiloader">yuiloader</a></li>
|
|
<li class=""><a href="module_yuitest.html" title="yuitest">yuitest</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div id="classList" class="module">
|
|
<h4>Classes</h4>
|
|
<ul class="content">
|
|
<li class="selected"><a href="YAHOO.util.Selector.html" title="YAHOO.util.Selector">YAHOO.util.Selector</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div id="fileList" class="module">
|
|
<h4>Files</h4>
|
|
<ul class="content">
|
|
<li class=""><a href="Selector.js.html" title="Selector.js">Selector.js</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div id="propertyList" class="module">
|
|
<h4>Properties</h4>
|
|
<ul class="content">
|
|
<li class=""><a href="#property_attrAliases" title="attrAliases">attrAliases</a></li>
|
|
<li class=""><a href="#property_document" title="document">document</a></li>
|
|
<li class=""><a href="#property_operators" title="operators">operators</a></li>
|
|
<li class=""><a href="#property_pseudos" title="pseudos">pseudos</a></li>
|
|
<li class=""><a href="#property_shorthand" title="shorthand">shorthand</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div id="methodsList" class="module">
|
|
<h4>Methods</h4>
|
|
<ul class="content">
|
|
<li class=""><a href="#method__tokenize" title="_tokenize">_tokenize</a></li>
|
|
<li class=""><a href="#method_filter" title="filter">filter</a></li>
|
|
<li class=""><a href="#method_query" title="query">query</a></li>
|
|
<li class=""><a href="#method_test" title="test">test</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="ft">
|
|
<hr />
|
|
Copyright © 2010 Yahoo! Inc. All rights reserved.
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
|
|
var ALL_YUI_PROPS = [{"access": "", "host": "YAHOO.util.Selector", "name": "attrAliases", "url": "YAHOO.util.Selector.html#property_attrAliases", "type": "property"}, {"access": "", "host": "YAHOO.util.Selector", "name": "document", "url": "YAHOO.util.Selector.html#property_document", "type": "property"}, {"access": "", "host": "YAHOO.util.Selector", "name": "filter", "url": "YAHOO.util.Selector.html#method_filter", "type": "method"}, {"access": "", "host": "YAHOO.util.Selector", "name": "operators", "url": "YAHOO.util.Selector.html#property_operators", "type": "property"}, {"access": "", "host": "YAHOO.util.Selector", "name": "pseudos", "url": "YAHOO.util.Selector.html#property_pseudos", "type": "property"}, {"access": "", "host": "YAHOO.util.Selector", "name": "query", "url": "YAHOO.util.Selector.html#method_query", "type": "method"}, {"access": "", "host": "YAHOO.util.Selector", "name": "shorthand", "url": "YAHOO.util.Selector.html#property_shorthand", "type": "property"}, {"access": "", "host": "YAHOO.util.Selector", "name": "test", "url": "YAHOO.util.Selector.html#method_test", "type": "method"}, {"access": "", "host": "YAHOO.util.Selector", "name": "_tokenize", "url": "YAHOO.util.Selector.html#method__tokenize", "type": "method"}];
|
|
</script>
|
|
</body>
|
|
</html>
|