Started

Selectors

Utilities

Animation

AJAX

CSS

Event

Manipulation

Cookie

String

Attributes

Data

Storage

Miscellaneous

$

Select element by id
$( id )
  1. id [string]
    The id of element.

Notes

This is the most useful and important function for all Qatrix code. It returns the element for you to use it on other place. This function actually is the simple replacement of document.getElementById(), which is extremely high performance for DOM operation. For complex and continuous manipulation, use $id. Qatrix will not define this function if you are using jQuery or other frameworks for compatibility so that you can use Qatrix with other frameworks at the same time.

Example

HTML code
<div id="box">Hello world!</div>
<button>
CSS code
#box {
	px;
	px;
	px;
	background: #5599bb;
	padding: 10px;
}
JavaScript code
function select_element()
{
	var box = $("box");

	alert(box.innerHTML);
}
Demonstration
Hello world!