Cframe demo page: Cframe.core

Click to checkout Cframe.ui
Part 1: Cdialog
You can use Cdialog to show ajax element like this:
Cdialog.show('login');
Also, for existed element, it will auto detect if it has already existed.
For this part, following config is available:
showMask: true, //show mask
isScroll:false, //auto detect scroll
zIndex: 1000, //z-index of the mask
scrollBar: 0, //auto calc scrollbar width
Part 2: Cverify
Use Cverify to check validity for input value, like this:
Cverify.email(form.id.value);
Cverify have following members:
Cverify.email
Cverify.password
Cverify.domain
Part 3: Cajax
You can use Cajax to set form as ajax request form only by adding ajax="callback" attribute to the form:
<form action="ajax url" ajax="myCallback">
It will encode the data and post all input to form action url.
And callback in ajax="callback" will be called when ajax has done.
You can define callbakc like "function callback(json){alert(json.msg);}"
It means the return value is a json object if your server return json like:
{"result":"1","msg":"success","others":"data"}
Part 4: Cothers
Cothers includes opCookie and getParam at present.
Cothers.opCookie has 3 overloads.
opCookie("name","value"); //set cookie
opCookie("get","value"); //get cookie
opCookie("del","value"); //delete cookie

Dont's forget config expire time and path.
Cothers.getParam can use like:
getParam("id");
Try to get Querystring param named "id"
Part 5: Cdrift
Cdrift is designed for imitating the drift effct of Andoid homepage background when you swipe the pages.
Cdrift has 3 const you need to set.
const threshold = 2; // threshold
const incr = 0.2; // increasement
const container = ".container"; // background container

Threshold told the valve value of mousemove event to trigger the drift.
Increasement told the drift amount of each trigger.
Use these two params to set the speed and smooth of the drift.

Click here to see demo online.