Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var current = 0;
- //$("#slides").css("background", "url('sites/archbig.png')");
- //$("#overlay").html("<a id='overlay' href='http://archlinux.org/'></a>");
- var sites = new Array();
- var urls = new Array();
- sites[0] = "sites/archbig.png";
- sites[1] = "sites/ddgsbig.png";
- urls[0] = "http://archlinux.org/";
- urls[1] = "http://duckduckgo.com/";
- function bec(x,y){
- $("#slides").css("background", "url('" + sites[x] + "')");
- $("#overlay").html("<a id='overlay' href='" + urls[y] + "'></a>");
- }
- bec(0,0);
- function move(){
- if(current >= 0 && current < urls.length){
- bec(current,current);
- }
- else if (current >= urls.length){
- current = 0;
- move();
- }
- else if (current < 0){
- current = urls.length-1;
- move();
- }
- else{ current = 0; }
- }
- function moveleft(){
- current--;
- move();
- }
- function moveright(){
- current++;
- move();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement