REF : https://github.com/HubSpot/odometer/issues/150
$(document).ready(function(){
$.fn.isInViewport = function() {
var elementTop = $(this).offset().top;
var elementBottom = elementTop + $(this).outerHeight();
var viewportTop = $(window).scrollTop();
var viewportBottom = viewportTop + $(window).height();
return elementBottom > viewportTop && elementTop < viewportBottom;
};
$(window).on('resize scroll', function() {
$('.odometer').each(function() {
if ($(this).isInViewport()) {
setTimeout(function(){
$('.odometer').html(240000);
}, 0);
} else {
}
});
});
});
Nice Contents -
ReplyDeleteHow to create a PDF from a form using PHP
PHP pagination with sortable table on header click
Python Tkinter Frame Widget
Python Tkinter Checkbutton Widget
Python Tkinter Combobox Event Binding
Python Tkinter Combobox
Python Tkinter Text Widget