Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
<section class="box" id="janela-home" >
        <div class="centro">
        </div>
    </section>
   <nav id="navegacao">
        <ul>
            <li><a href="#janela-home" onClick="add('0');">&#9679;</a></li>
            <li><a href="#janela-skills" onClick="add('1');">&#9679;</a></li>
            <li><a href="#janela-sobre" onClick="add('2');">&#9679;</a></li>
            <li><a href="#janela-contato" onClick="add('3');">&#9679;</a></li>
        </ul>
    </nav>
</body>
</html>
 
.box{
    position:absolute;
    width:100%;
    height:100%}
 
var count=0;
function Picture(){
    if (event.wheelDelta >= 4){
        if(count == 3){
            count=-1;
        }else{
            Resize(++count);
        }
    }
    else if (event.wheelDelta <= 4)
        if(count == 0){
            count=4;
        }else{
            Resize(--count);
        }
    return false;
}
function Resize(c){    
    var nav = document.getElementById('navegacao');
    var btn = nav.getElementsByTagName('li');
    var ln = nav.getElementsByTagName('a');
    ln[c].click();
}
var mousewheelevt=(/Firefox/i.test(navigator.userAgent))? "DOMMouseScroll" : "mousewheel" //FF doesn't recognize mousewheel as of FF3.x
 
if (document.attachEvent) //if IE (and Opera depending on user setting)
    document.attachEvent("on"+mousewheelevt, function(e){Picture()})
else if (document.addEventListener) //WC3 browsers
    document.addEventListener(mousewheelevt, function(e){Picture()}, false)
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers