This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
| <script> | |
| $(window).on("DOMContentLoaded resize orientationchange", function(){ | |
| console.log("changing", $("body").outerHeight()) | |
| $(parent.document.body).find("#iframe").height($("body").outerHeight() + 30) | |
| }) | |
| </script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Checks if push state is available | |
| if (history && history.pushState) | |
| #sets higher time out other wise pjax aborts a lot | |
| $.pjax.defaults.timeout = 10000 | |
| $(document).pjax("a.pjax", "[data-pjax-container]").on "pjax:end", -> | |
| #Trigger code that needs to happen on page load |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Detect CSS3 Transitions | |
| var cssTransitionsSupported = false; | |
| (function() { | |
| var div = document.createElement('div'); | |
| div.innerHTML = '<div style="-webkit-transition:color 1s linear;-moz-transition:color 1s linear;"></div>'; | |
| cssTransitionsSupported = (div.firstChild.style.webkitTransition !== undefined) || (div.firstChild.style.MozTransition !== undefined); | |
| // console.log(cssTransitionsSupported); | |
| delete div; | |
| })(); |