forked from luisvallejomohl/Penguins.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocumentation.html
40 lines (39 loc) · 3.77 KB
/
documentation.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!DOCTYPE HTML><HTML><HEAD><META CHARSET="ISO-8859-1"><TITLE>Penguins.js documentation</TITLE><STYLE>body{font-family:arial}table,td,th{border:2px solid black}</STYLE></HEAD><BODY>
<H2>Documentation</h2>
<P>Note: Penguins.js uses semantic versioning as defined as in <A HREF="https://semver.org/spec/v1.0.0.html">Semantic Versioning 1.0</A></P>.
Penguins.js is all about the <CODE>PenguinsJS</CODE> function, which can also be written as:
<UL>
<LI><CODE>_PenguinsJS</CODE></LI>
<LI><CODE>_</CODE></LI>
<LI><CODE>__</CODE></LI>
Penguins.js is desgned to shorten down your code, and can go along with <A HREF="https://www.jquery.com">jQuery</A> to shorten down your code.
<H2> Documentation table</H2>
<TABLE>
<THEAD>
<TR>
<TH>Functionality</TH>
<TH>Uses</TH>
<TH>Status</TH>
</TR>
<TBODY>
<TR><TD>
_('[CSS selector]') </TD><TD> Returns a Penguins.js object based on the input selector</TD></TR><TR><TD>
_('...').set('[property]', '[value]') </TD><TD> Sets the property [property] to [value] for each element matching the CSS selector ...</TD></TR><TR><TD>
_('...').add('[property]', '[value]') </TD><TD> Adds [value] to the property [property] of all elements matching the CSS selector ...</TD></TR><TR><TD>
_('...').onEvent('[event]', [function]) </TD><TD> Adds an event listener to all elements matching the CSS selector ..</TD></TR><TR><TD>
_('...').get('[property]') </TD><TD> Returns an array of the value of property [property] of all elements matching CSS selector ...</TD></TR><TR><TD>
new _('[type]').requestTo('[URL]') </TD><TD> Returns a [type] AJAX request to [URL], asynchronous by default</TD></TR><TR><TD>
request.onResponse = [callback] </TD><TD> Equivalent of the onreadystatechange Vanilla JS property. Does not require a check (if(this.status === 200 && this.readyState === 4))</TD></TR><TR><TD>
request.send() </TD><TD> Sends the AJAX request request (for GET requests) </TD></TR><TR><TD>
request.send('[data]') </TD><TD> Semds the AJAX request request (for POST requests)</TD></TR><TR><TD>
_('*').date </TD><TD> Returns the date as in Vanilla javaScript new Date() </TD><TD><IMG SRC="https://openclipart.org/download/169402/Recycle-bin.svg" WIDTH="50" ALT="Obsolete" TITLE="This technology is obsolete"></TD></TR><TR><TD>
PenguinsJS.version </TD><TD> Returns an object containing information about the version of Penguins.js used</TD></TR><TR><TD>
_('[selector]').toDOMNodeList </TD><TD> Converts the Penguins.js object into a DOM node list</TD><TD><IMG SRC="https://openclipart.org/download/169402/Recycle-bin.svg" WIDTH="50" ALT="Obsolete" TITLE="This technology is obsolete"></TD></TR><TR><TD>
_('[selector]').toDOMNodeArray </TD><TD> Converts the Penguins.js object into an array of DOM nodes</TD></TR><TR><TD>
metadata </TD><TD> Returns an object including information about the metadata of the HTML document <STRONG><EM>ONLY</EM></STRONG> if jQuery is included </TD><!--<IMG SRC="https://openclipart.org/image/2400px/svg_to_png/189402/1386617449.png" ALT="Experimental" WIDTH="50" TITLE="This technology is experimental">--></TR><TR><TD>
metadata.addTag('[name]', '[value]') </TD><TD> Adds a <META> tag with NAME attribute set to [name] and CONTENT attribute set to [value] </TD></TR><TR><TD>
metadata.removeTag('[name]') </TD><TD>Removes the first <META> tag with NAME attribute set to [name]</TD></TR><TR><TD>
_('...').selector</TD><TD>Returns the initial selector ...</TD></TR><TR><TD>
_('*').playAudioAt([obj])</TD><TD>Plays audio at the source [obj].source and volume [obj].volume</TD></TR><TR><TD>
_('...').addElement('[tag name]', '[voidity]', '[ID]') </TD><TD> Appends a [tag name] HTML tag with voidity [voidity] and an ID of [ID] to the elements matching CSS selector ...</TD></TR>
</TBODY></TABLE></BODY></HTML>