/* * jQuery appear plugin * * Copyright (c) 2012 Andrey Sidorov * licensed under MIT license. * * https://github.com/morr/jquery.appear/ * * Version: 0.3.3 */ (function($) { var selectors = []; var check_binded = false; var check_lock = false; var defaults = { interval: 250, force_process: false } var $window = $(window); var $prior_appeared; function process() { check_lock = false; for (var index = 0; index < selectors.length; index++) { var $appeared = $(selectors[index]).filter(function() { return $(this).is(':appeared'); }); $appeared.trigger('appear', [$appeared]); if ($prior_appeared) { var $disappeared = $prior_appeared.not($appeared); $disappeared.trigger('disappear', [$disappeared]); } $prior_appeared = $appeared; } } // "appeared" custom filter $.expr[':']['appeared'] = function(element) { var $element = $(element); if (!$element.is(':visible')) { return false; } var window_left = $window.scrollLeft(); var window_top = $window.scrollTop(); var offset = $element.offset(); var left = offset.left; var top = offset.top; if (top + $element.height() >= window_top && top - ($element.data('appear-top-offset') || 0) <= window_top + $window.height() && left + $element.width() >= window_left && left - ($element.data('appear-left-offset') || 0) <= window_left + $window.width()) { return true; } else { return false; } } $.fn.extend({ // watching for element's appearance in browser viewport appear: function(options) { var opts = $.extend({}, defaults, options || {}); var selector = this.selector || this; if (!check_binded) { var on_check = function() { if (check_lock) { return; } check_lock = true; setTimeout(process, opts.interval); }; $(window).scroll(on_check).resize(on_check); check_binded = true; } if (opts.force_process) { setTimeout(process, opts.interval); } selectors.push(selector); return $(selector); } }); $.extend({ // force elements's appearance check force_appear: function() { if (check_binded) { process(); return true; }; return false; } }); })(jQuery);
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
admin-custom-script.js | File | 6.23 KB | 0644 |
|
custom-script-v2.js | File | 61.41 KB | 0644 |
|
custom-script-v2.min.js | File | 36.23 KB | 0644 |
|
isotope.pkgd.min.js | File | 34.61 KB | 0644 |
|
jquery.appear.js | File | 2.36 KB | 0644 |
|
jquery.appear.min.js | File | 858 B | 0644 |
|
jquery.countTo.min.js | File | 943 B | 0644 |
|
jquery.flexslider-min.js | File | 22.48 KB | 0644 |
|
jquery.magnific-popup.min.js | File | 19.74 KB | 0644 |
|
jquery.waypoints.min.js | File | 7.83 KB | 0644 |
|
main.min.js | File | 79.85 KB | 0644 |
|
mb-commingsoon.min.js | File | 5.37 KB | 0644 |
|
portfolio.js | File | 11.36 KB | 0644 |
|
portfolio.min.js | File | 5.08 KB | 0644 |
|
smooth_scroll.min.js | File | 7.25 KB | 0644 |
|
thim-content-slider.js | File | 6.62 KB | 0644 |
|
thim-course-filter-v2.js | File | 3.48 KB | 0644 |
|
thim-course-filter-v2.min.js | File | 2.06 KB | 0644 |
|
thim-course-filter.js | File | 8.04 KB | 0644 |
|
thim-course-filter.min.js | File | 4.21 KB | 0644 |
|
thim-scripts.js | File | 29.93 KB | 0644 |
|
thim-scripts.min.js | File | 18.1 KB | 0644 |
|
thim_simple_slider.js | File | 4.68 KB | 0644 |
|
thim_simple_slider.min.js | File | 2.2 KB | 0644 |
|