Skip to content

Instantly share code, notes, and snippets.

@arextar
arextar / gist:2324454
Created April 7, 2012 01:45
adding :visible and :hidden to zepto
;(function($){
var _is = $.fn.is, _filter = $.fn.filter;
function visible(elem){
elem = $(elem);
return !!(elem.width() || elem.height()) && elem.css("display") !== "none";
}
$.fn.is = function(sel){
if(sel === ":visible"){
@arextar
arextar / achievements.js
Created August 7, 2012 18:51
Pine API ideas
/* Notes:
* Methods that modify the progress of the achievement have a notify option.
This option tells whether or not the user should be notified about the
achievement by the native UI (some sort of popup in the corner and maybe
a sound)
* The plan for this API is to perform network IO asynchrnously in the
background while using data cached by the Pine library to make the
API feel synchronous. Essentially, the progress of each achievement
will be loaded when the game is loaded and will be used for any
get operations with this API. An async request is put out when an