nakamotojp / xframe.js

cross-domain iframe scroll

Home Page:http://shokai.github.io/xframe.js/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

XFrame.js

Cross Domain iframe scroll

demo

Requirements

  • jQuery
  • not works on file://

Usage

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="xframe.js"></script>
<div id="tv"></div>
var xframe = new XFrame("div#tv");

load page

xframe.load("http://shokai.org");

scroll

xframe.scrollX(10);
xframe.scrollY(100);
xframe.top = 200;
xframe.left = 50;

enable/disable mouse scroll

xframe.mouseScroll = true;
xframe.mouseScroll = false;

Build

edit "HEADER.txt"

% npm install -g uglify-js
% make build

=> xframe.js

About

cross-domain iframe scroll

http://shokai.github.io/xframe.js/

License:MIT License


Languages

Language:JavaScript 100.0%