Use
if ( anynumber % 10 == 1 ) {do something}
Hi
I build slideshow with 10 visible thumbnails. After each 10 pictures I
move thumbnails to show next 10.
Another words
if (id==11 || id==21 || id==31) {do something}
How to write more wise if statement?
Thanks
Only change 10 to any other number. % means mod - it calculates the rest
of the division. So if you want to show 8 images, write
if ( anynumber % 8 == 1 ) {do something}
anynumber % 8 == 1 happens when anynumber is 9, 17, ...
same to 12 or any other modular event
Thank you! What if I want
2 matches
Mail list logo