Skip to Content

JavaScript File

URL: https://tools.hostboxonline.com/assets/site_new/js/vendor/jquery.appear.js
HTTP Status: 200 OK
MIME Type: text/javascript
Last Modified: Mon, 12 Feb 2018 04:50:02 GMT
Download Time: Less than a second
Cookies: None
Size: 5 KB
HTTP Headers:  29 headers
Links In:  1 pages
Links Out:  0 links
Images:  0 images
CSS:  0 files
JavaScript:  0 files
OK Issues: No issues found

1/*

2 * jQuery.appear

3 * https://github.com/bas2k/jquery.appear/

4 * http://code.google.com/p/jquery-appear/

5 * http://bas2k.ru/

6 *

7 * Copyright (c) 2009 Michael Hixson

8 * Copyright (c) 2012-2014 Alexander Brovikov

9 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)

10 */

11(function($) {

12 $.fn.appear = function(fn, options) {

13

14 var settings = $.extend({

15

16 //arbitrary data to pass to fn

17 data: undefined,

18

19 //call fn only on the first appear?

20 one: true,

21

22 // X & Y accuracy

23 accX: 0,

24 accY: 0

25

26 }, options);

27

28 return this.each(function() {

29

30 var t = $(this);

31

32 //whether the element is currently visible

33 t.appeared = false;

34

35 if (!fn) {

36

37 //trigger the custom event

38 t.trigger('appear', settings.data);

39 return;

40 }

...

</html>