javascript - Set height of an element on multiples of a number? -
is there way via jquery or javascript make element stretch height set of numbers? mean, accommodates more content, height follow pattern of numbers (multiples of number).
let's in multiples of 100... div's height extends taller in series -- 200px, 300px, 400px, etc. hence, if exceeds 1 pixel off 200, automatically resize 300.
it's hard explain.
i need because made vertically seamless pattern torn edges , totally perfect if shows each tile completely.
i know basic jquery , don't have bit of idea on how work out.
my sincerest gratitude whoever tends query!
var h = $('div').height(); $('div').height( math.ceil(h/100) * 100 );
Comments
Post a Comment