Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
<meta charset=utf-8 />
<title>Demo by Roko C.B.</title>
</head>
<body>
  
  <p>http://www.getbootstrap.com</p>
  <a href="#" id="backwards">Backwards</a>
  <a href="#" id="forwards">Forwards</a>
  
  
</body>
</html>
 
var urls = ["http://www.getbootstrap.com",
            "http://www.reddit.com",
            "http://www.bbc.com/news",
            "http://www.google.com"
           ],
    c = 0,
    n = urls.length;
$('#forwards, #backwards').click(function( e ){
    e.preventDefault(); 
    c = this.id=='forwards' ? ++c : --c;
    c = c<0? n-1 : c%n ;
  
    $('p').text(urls[c]);
    //$('iframe')[0].src = urls[c];
}); 
Output

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

Dismiss x
public
Bin info
roXonpro
0viewers