Skip to Content

JavaScript File

URL: https://www.hereward.ac.uk/js/responsive-nav.js
HTTP Status: 200 OK
MIME Type: text/javascript
Last Modified: Mon, 01 Jan 1601 00:00:00 GMT
Download Time: Less than a second
Cookies: None
Size: 20 KB
HTTP Headers:  6 headers
Links In:  1 pages
Links Out:  0 links
Images:  0 images
CSS:  0 files
JavaScript:  0 files
OK Issues: No issues found

1/*! responsive-nav.js 1.0.39

2 * https://github.com/viljamis/responsive-nav.js

3 * http://responsive-nav.com

4 *

5 * Copyright (c) 2015 @viljamis

6 * Available under the MIT license

7 */

8

9/* global Event */

10(function (document, window, index) {

11 // Index is used to keep multiple navs on the same page namespaced

12

13 "use strict";

14

15 var responsiveNav = function (el, options) {

16

17 var computed = !!window.getComputedStyle;

18

19 /**

20 * getComputedStyle polyfill for old browsers

21 */

22 if (!computed) {

23 window.getComputedStyle = function(el) {

24 this.el = el;

25 this.getPropertyValue = function(prop) {

26 var re = /(\-([a-z]){1})/g;

27 if (prop === "float") {

28 prop = "styleFloat";

29 }

30 if (re.test(prop)) {

31 prop = prop.replace(re, function () {

32 return arguments[2].toUpperCase();

33 });

34 }

35 return el.currentStyle[prop] ? el.currentStyle[prop] : null;

36 };

37 return this;

38 };

39 }

40 /* exported addEvent, removeEvent, getChildren, setAttributes, addClass, removeClass, forEach */

...

</html>