javascript - Passing a value to a function in jQuery -


i hope understand mean ask, since find hard formulate question properly. i'm new jquery , i'm using jquery in website rotate div underlying div shows up. it's working perfectly. thing want previous , next buttons. want following; if e.g. container2 rotate position unequal 0, skip 1 , check rotate position next div, knows div still @ 0 , can rotate underlying div shows up. (its sorta book). know how if\else statements work, trouble have passing degree if else statement. example code of statements now. tried creating variable, made complete mess , still seem unable make work. hope can me. example code of use now.

$(".homeclick").click(function(){     $("#container2").rotate({animateto:150})     $("#container").rotate({animateto:0}) 

are looking this? http://jsfiddle.net/sjuqe/

$(".homeclick").click(function(){     $("#container2").css('-webkit-transform', 'rotate(150deg)');     $("#container2").css('transform', 'rotate(150deg)');     $("#container").css('-webkit-transform', 'rotate(0deg)');     $("#container").css('transform', 'rotate(0deg)');     }); 

<----------------------------------------------->
update:

might this:
rename container id container1 container2 ... etc , then

var max_container = 2; var min_container = 0; var container = 1;     $(volgende).click(function(){if ( container < max_container ) $(('#container'+container)).rotate({animateto:150});container++;})     $(vorige).click(function(){if ( container > min_container ) $(('#container'+container)).rotate({animateto:0});container--;}) 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -