Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
126 lines (123 sloc) 4.47 KB
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="../gFrame.js"></script>
<title> gFrame (API)</title>
<link href='http://fonts.googleapis.com/css?family=Droid+Serif:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Cousine' rel='stylesheet' type='text/css'>
<link href="http://alexgorbatchev.com/pub/sh/current/styles/shCore.css" rel="stylesheet" type="text/css" />
<link href="http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css" rel="stylesheet" type="text/css" />
<link href="style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../resource/jquery.js"></script>
<script type="text/javascript" src="demo.js"></script>
<script type="text/javascript" src="http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js"></script>
<script type="text/javascript" src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJScript.js"></script>
<script type="text/javascript" src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushXml.js"></script>
<style>
</style>
</head>
<body>
<a href="http://github.com/floras/gFrame" target="_blank" style="position: absolute; top: 0; left: 0; border: 0;z-index:50;"><img src="https://d3nwyuy0nl342s.cloudfront.net/img/6429057dfef9e98189338d22e7f6646c6694f032/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f6c6566745f6f72616e67655f6666373630302e706e67" alt="Fork me on GitHub"></a>
<div id='header'>
<h1 id="title" style="position:relative;">
<div id="wrapwrap">
<span id="titleWrap">
<span class="red">g</span><span id="host">host </span><span class="red">Frame</span>
</span>
<div id="ver"></div>
</div>
</h1>
<div id="pages">
<span id="home"><a href="index.html">HOME</a></span><span><a href="example.html">EXAMPLE</a></span><span><a href="api.html">API</a></span><span id="download"><a href="../gFrame.js" target="_blank">DOWNLOAD</a></span>
</div>
</div>
<div id="container">
<ul>
<li> gFrame.main - outter frame window </li>
<li> gFrame.content - original source window </li>
<li> gFrame.alive </li>
</ul>
<h4> gFrame : start | stop </h4>
<ul>
<li> gFrame.start() </li>
<li> gFrame.stop()</li>
</ul>
By cookie.
<h4> gFrame : event </h4>
<ul>
<li> gFrame.ready(function, global) </li>
<li> gFrame.load(function, global)</li>
<li> gFrame.unload(function, global)</li>
<li> gFrame.trigger(type)</li>
<li> gFrame.removeEvent(type, func)</li>
</ul>
<h4> gLayer : create | remove </h4>
<ul>
<li> gFrame(id_string, code_string, option_object) </li>
<li> gFrame.create(id_string, code_string, option_object) </li>
<li> gFrame.remove(id)</li>
<li> gFrame(id).remove()</li>
<li> gFrame.get(id) - It returns gLayer </li>
<li> gFrame.has(id)</li>
<li> gFrame.size()</li>
<li> gFrame.list()</li>
<li> gFrame.reset([true])</li>
</ul>
Don't worry about creating same id of gLayer. Same id is ignored. <br/>
Use 'gFrame.has' for checking existence.
<h4> gLayer : dimension </h4>
<ul>
<li> gLayer.top([val]) </li>
<li> gLayer.bottom([val])</li>
<li> gLayer.left([val])</li>
<li> gLayer.right([val])</li>
<li> gLayer.width([val])</li>
<li> gLayer.height([val])</li>
<li> gLayer.zIndex([val])</li>
<li> gLayer.moveTo(val, val)</li>
<li> gLayer.moveBy(val, val)</li>
<li> gLayer.resizeTo(val, val)</li>
<li> gLayer.resizeBy(val, val)</li>
</ul>
It returns gLayer instance or value.
<h4> gLayer : etc </h4>
<ul>
<li> gLayer.text(value) - innerHTML</li>
<li> gLayer.style(value) </li>
<li> gLayer.opacity(value) </li>
</ul>
<h4> gFrame : once </h4>
<ul>
<li> gFrame.once(id, code or function)</li>
<li> gFrame.once.remove(id) </li>
<li> gFrame.once.empty() </li>
<li> gFrame.once.size() </li>
<li> gFrame.once.list() </li>
</ul>
If you excute small code written in the document. Once is useful.
<h4> etc </h4>
<ul>
<li> gFrame.eval(code or function) - excute code in the gFrame.main</li>
<li> gFrame.loadScript(src, callback)</li>
</ul>
<h4> gFSETUP </h4>
<div class="pre">
<pre class="brush: js;html-script: true">
&lt;script/>
gFSETUP = {
style : "body{font:12px georiga}...",
head : " ",
body : "&lt;div> HELLO WORLD&lt;/div>",
scripts : ['alert("hi");', function(){alert("hello"}]
};
&lt;/script>
&lt;script type="text/javascript" src="gFrame.js">&lt;/script>
</pre>
</div>
<br/>
<br/>
<br/>
</div>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.