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 | |
// Sort BuddyPress users by last name | |
// | |
// Use this Gist to sort members alphabetically by last name in the | |
// members directory. Follow the instructions below and drop the code | |
// in your functions.php or your functions plugin. | |
// | |
// Updated to work with BP 1.7. See earlier revisions of this gist for | |
// earlier versions of BP. |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"/> | |
<title> | |
Google Visualization API Sample | |
</title> | |
<script type="text/javascript" src="http://www.google.com/jsapi"></script> | |
<script type="text/javascript"> | |
google.load('visualization', '1', {packages: ['controls']}); |
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
<!-- HTML5 DOCTYPE, IMPORTANT --> | |
<!DOCTYPE html> | |
<html dir="ltr" lang="en-EN"> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Title</title> | |
<!-- VIEWPORT, AVOID BROWSER NAV BAR, AND HANDHELD DECLARATIONS --> |
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
// force certain pages to be refreshed every time. mark such pages with | |
// 'data-cache="never"' | |
// | |
jQuery('div').live('pagehide', function(event, ui){ | |
var page = jQuery(event.target); | |
if(page.attr('data-cache') == 'never'){ | |
page.remove(); | |
}; | |
}); |
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
jq('div').live('pagebeforeshow', function(event, ui){ | |
var page = jq(event.target); | |
var url = page.attr('data-refresh'); | |
if(url){ | |
var ajax = {}; | |
ajax.url = url; | |
ajax.type = 'GET'; |
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.validate.requiredIfVisible.js | |
// Copyright (c) 2010 Ori Peleg, http://orip.org, distributed under the MIT license | |
(function($) { | |
$.validator.addMethod( | |
"requiredIfVisible", | |
function(value, element, params) { | |
function isVisible(e) { | |
// the element and all of its parents must be :visible | |
// inspiration: http://remysharp.com/2008/10/17/jquery-really-visible/ | |
return e.is(":visible") && e.parents(":not(:visible)").length == 0; |