optimized height calculation + bug fixes

+ optimized calculation of target element height by removing top and
bottom paddings
+ changed variables scope
+ improved demo page
~ bug fixed for multiple selectors