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
// If you do not want to open a popup from a user clicking a button, | |
// and your popup container is already on the page (footer?) hidden... | |
$.magnificPopup.open({ | |
items: { | |
src: $('#modal-container') | |
}, | |
type: 'inline', | |
mainClass: 'mfp-fade' | |
}); |
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
// Alter the logic for bounds to detect :after or :before pseudo elements. | |
var checkMousePosition = function(element, e) { | |
var h = element.outerHeight(), | |
w = element.outerWidth(), | |
top = element.offset().top, | |
left = element.offset().left, | |
inY = e.pageY !== undefined && ( e.pageY >= top && e.pageY <= (top + h) ), | |
inX = e.pageX !== undefined && ( e.pageX >= left && e.pageY <= (left + w) ); | |
if (inY && inX) { |
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
/* | |
* SASS for http://propublica.github.io/stateface/ icon set. | |
* author: amurrell | |
*/ | |
@font-face { | |
font-family: 'icons-usa'; | |
src: url('../fonts/icons-usa.eot'); | |
src: url('../fonts/icons-usa.eot?#iefix') format('embedded-opentype'), | |
url('../fonts/icons-usa.woff') format('woff'), |
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 | |
// Make your key https://console.developers.google.com | |
define('YOUTUBE_API_KEY', 'XXXXXXXXXXXXXXXXXXXXXXXXXXX'); | |
class YouTubeAPI { | |
private $keyword=""; | |
private $maxResults = 10; | |
private $order = "viewCount"; | |
private $query = ''; | |
private $data = ''; |
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
// Use to debug - Find out events on a jQuery object. Might not work for 1.8+ jQuery. | |
// Run this in your console, for example, just alter the get_events call. | |
function get_events(selector) { | |
var element = $(selector); | |
if (element.length > 1) | |
return 'too many matched elements. make it unique'; | |
if (element.length < 1) |
NewerOlder