Closed digitalillusion closed 7 years ago
@digitalillusion didn't notice this PR, sorry~ (I was on New Year vacation here in Taiwan :P) I'll check that in these few days. BTW, if possible, can you try to write a test case for it ? Just verify the position can be correctly calculated and it's enough :) Big Thanks again
@EragonJ I added some tests, they only work in firefox (not in chrome) due to different policy considering localhost as a cross domain request.
@digitalillusion thanks !!
jquery allows to write a selector which targets elements inside an iframe, and this can be passed to Trip.js However, the library does not behave correctly in such case. The PR introduces two methods to get the left and top offset of an element inside an iframe. The methods are used to scroll in place and to correctly position the $tripBlock. A lightweight check is performed to verify if the element is indeed inside an iframe, so performance is not degraded by the new feature