Can I use iScroll to scrollToElement + offset? -


i have code working...

myscroller.scrollto(0, -654, 200); 

i have working....

myscroller.scrolltoelement("#p4", "1s"); 

is there way add offset #id, scrolltoelement("#p4" + 100, "1s")?

no can't.

myscroller.scrolltoelement("#p4", "1s"); 

because first parameter should css selector of dom element. therefore can use "#p4" + 100 applying css rules? if answer yes can else cannot.

if wanted scroll next element after particular time can try nth-child() css property appropriate timeout , incremental flag. (assume elements inside parent div element have id mydiv)

var incre = 0; function customscrolltoelement(){   myscroller.scrolltoelement("#mydiv:nth-child(" + incre + ")", 10);   incre ++; } settimeout(function(){   customscrolltoelement(); },100); 

Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -