Jump to content

Jquery calling function


manix

Recommended Posts

	var CurPic = 1;

function Previous(){
CurPic--;
if (CurPic==0) {CurPic=5;}
$("#picslot").attr("src", CurPic+".jpg");
}

function Next(){
CurPic++;
if (CurPic==6) {CurPic=1;}
$("#picslot").attr("src", CurPic+".jpg");
}

$("#larrow").click(Previous);
$("#rarrow").click(Next);

$("body").bind('keydown',function(e) {

var keypressed = e.which
switch(keypressed)
{
case 37:
Previous;
break;

case 39:
Next;
break;
}

});

 

this is a picture slider kind of thingy ...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.