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
| const mq1000 = window.matchMedia( "(min-width: 1000px)" ); | |
| this.mq1000 = mq1000; | |
| if(mq1000.matches){} | |
| mq1000.addListener(function(changed){ | |
| if(changed.matches){} | |
| }) |
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
| var a=document.getElementsByTagName("a"); | |
| for(var i=0;i<a.length;i++) { | |
| if(!a[i].onclick && a[i].getAttribute("target") != "_blank") { | |
| a[i].onclick=function() { | |
| window.location=this.getAttribute("href"); | |
| return false; | |
| } | |
| } | |
| } |
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
| function valBetween(v, min, max) { | |
| return (Math.min(max, Math.max(min, v))); | |
| } |
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
| function offset(el){ | |
| var rect = el.getBoundingClientRect(), | |
| scrollLeft = window.pageXOffset || document.documentElement.scrollLeft, | |
| scrollTop = window.pageYOffset || document.documentElement.scrollTop; | |
| return { top: rect.top + scrollTop, left: rect.left + scrollLeft } | |
| } | |
| // example use | |
| var div = document.querySelector('div'); | |
| var divOffset = offset(div); |
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
| {"lastUpload":"2018-10-16T21:20:35.400Z","extensionVersion":"v3.1.2"} |
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
| Standard easing (Outgoing Easing: 40%, Incoming Easing: 80%): | |
| cubic-bezier(0.4, 0.0, 0.2, 1); | |
| Decelerate easing (Outgoing Easing: 0%, Incoming Easing: 80%): | |
| cubic-bezier(0.0, 0.0, 0.2, 1); | |
| Accelerate easing (Outgoing Easing: 40%, Incoming Easing: 0%): | |
| cubic-bezier(0.4, 0.0, 1, 1); |
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
| <img src="file://null"> |
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
| /* formula */ | |
| font-size: calc( min-font-size + (max-font-size - min-font-size)*(100vw - min-screen-size)/(max-screen-size - min-screen-size) ); | |
| /* example */ | |
| font-size: calc( 16px + (24 - 16)*(100vw - 400px)/(800 - 400) ); |
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
| $.ajax({ | |
| url: target_file, | |
| beforeSend: function(){ | |
| // triggered before the ajax-call is made | |
| } | |
| }).done(function(data){ | |
| // triggered when ajax-call is done, the loaded file is stored in data-variable | |
| // load specific element (content) from the data into specific element (container): | |
| $("#container_element").html($(data).find('#content_element')); | |
| }).fail(function(){ |
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
| <img class="unveil" src="" data-src="" data-mobile="pfad1.jpg" data-desktop="pfad2.jpg" data-retina="pfad3.jpg"> |