Cross-browser function to add events on DOM elements.
This file contains 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
https://graph.facebook.com/<user_id>/notifications?href=/some_url.php&template=testing&access_token=<app_access_token>&method=POST |
This file contains 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
/** | |
* jQuery extension, add support `scrollstart` and `scrollend` events. | |
* | |
* @author RubaXa <trash@rubaxa.org> | |
* @github https://gist.github.com/RubaXa/5568964 | |
* @license MIT | |
* | |
* | |
* @settings | |
* $.special.scrollend.delay = 300; // default ms |
This file contains 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 inferInputModel() { | |
if (window.navigator.msPointerEnabled) { | |
return 'pointer'; | |
} else if (window.ontouchstart !== undefined) { | |
return 'touch'; | |
} else { | |
return 'unknown'; | |
} | |
} |
This file contains 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
<span class="toggler active" data-toggle="grid"><span class="entypo-layout"></span></span> | |
<span class="toggler" data-toggle="list"><span class="entypo-list"></span></span> | |
<ul class="surveys grid"> | |
<li class="survey-item"> | |
<span class="survey-country list-only"> | |
UK | |
</span> | |
This file contains 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
<div id="btns"> | |
<div class="btn" onclick="window.location='#'"> | |
<svg class="icon"> | |
<use xlink:href="#helmet"></use> </svg> | |
<h2>Heading</h2> | |
<p>Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p> | |
</div> | |
<div class="btn" onclick="window.location='#'"> | |
<svg class="icon"> | |
<use xlink:href="#cutters"></use> </svg> |
This file contains 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
<!-- Menu App Interface | |
<!-- Based on a Dribbble shot | |
<!-- that caught my eye | |
<!-- http://drbl.in/pWyx | |
<!-- ---------------------------------- --> | |
<div class="paper preview-1"> | |
<div class="box"> | |
<div class="bar"> | |
<div class="menu"> |
This file contains 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
<figure id="showcase"> | |
<section></section> | |
<section></section> | |
<section></section> | |
<section></section> | |
</figure> |
This file contains 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
<?php | |
/** | |
* filter valid utf-8 byte sequences | |
* | |
* take over all valid bytes, drop an invalid sequence until first | |
* non-matching byte, start over at that byte. | |
* | |
* @param string $str | |
* @return string | |
*/ |