#N-dual.js
##Control Web Application with phone or pad
Create by youyudehexie
Refer to controldeck.js, remote.js
##Getting Started
- Go to http://ndual.whattoc.com/example1 to view demo1
- Scan the qrcode on screen with your phone and jump to the url
- Wait for a few second, you can control your web application by drag.
Attention:
1.wechat bowser performance is terrible, please use chrome.
##Make your own
<script src="/socket.io/socket.io.js"></script>
<script src="/ndual.js"></script>
<script>
Ndual(function(message){
if(message === 'dragright') Reveal.navigateRight(); //doSomething you want to do,here is an example
else if (message === 'dragleft') Reveal.navigateLeft();
})
</script>
the phone controller will send message to your application.you can catch the message and do something you wantto do.such as click something, move element.
##Example
##Download
https://github.com/youyudehexie/n-dual/tree/master/public/build
##My Seed Project