Started

Selectors

Animation

AJAX

CSS

Event

Manipulation

Cookie

String

Attributes

Data

Storage

Miscellaneous

$cache.inc

Increase the number of data by one.
$cache.inc( key )
  1. key [string]
    The key of value.

Notes

Qatrix cache system is best to store data for further usage.

Example

HTML code
<div id="message"></div>
<button onclick="start_cache_get()">Get name</button>
<button onclick="start_cache_get_count()">Get count</button>
<button onclick="start_cache_inc()">Count increase</button>
<button onclick="start_cache_dec()">Count decrease</button>
<button onclick="start_cache_set()">Set name to "Jone"</button>
<button onclick="start_cache_remove()">Remove name</button>
<button onclick="start_cache_flush()">Cache flush</button>
JavaScript code
$cache.set( "name", "Tom" );
$cache.set( "count", 10 );
function updata_cache()
{
	$html( $("message"), "$cache.name = " + $cache.get( "name" ) + "<br />$cache.count = " + $cache.get( "count" ) );
}
function start_cache_get()
{
	alert( "name: " + $cache.get( "name" ) );
}
function start_cache_get_count()
{
	alert( "count: " + $cache.get( "count" ) );
}
function start_cache_inc()
{
	$cache.inc( "count" );
	updata_cache();
}
function start_cache_dec()
{
	$cache.dec( "count" );
	updata_cache();
}
function start_cache_set()
{
	$cache.set( "name", "Jone" );
	updata_cache();
}
function start_cache_remove()
{
	$cache.remove( "name" );
	updata_cache();
}
function start_cache_flush()
{
	$cache.flush();
	updata_cache();
}
updata_cache();
Demonstration