This is a very simple lightweight plugin to allow you to move the caret (or cursor) position in an <input /> or <textarea> element.
By exposing three jQuery.fn methods you can easily move a a caret to any position you like:
Number.prototype.yoString = function() { | |
return 'Yo, ' + this + '!'; | |
}; | |
| |
var num = 3; | |
console.log(num.yoString()); |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
<section> | |
<div class="button"> | |
<a href="https://twitter.com/bennettfeely" class="twitter-follow-button" data-show-count="false" data-size="large">Follow @bennettfeely</a> | |
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> | |
</div> | |
<div class="cover"> | |
<div class="innie"></div> | |
<div class="spine"></div> | |
<div class="outie"></div> | |
</div> |
var countries_data = {"type":"FeatureCollection","features":[ | |
{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[74.92,37.24],[74.57,37.03],[72.56,36.82],[71.24,36.13],[71.65,35.42],[71.08,34.06],[69.91,34.04],[70.33,33.33],[69.51,33.03],[69.33,31.94],[66.72,31.21],[66.26,29.85],[62.48,29.41],[60.87,29.86],[61.85,31.02],[60.84,31.5],[60.58,33.07],[60.94,33.52],[60.51,34.14],[61.28,35.61],[62.72,35.25],[63.12,35.86],[64.5,36.28],[64.8,37.12],[66.54,37.37],[67.78,37.19],[69.32,37.12],[70.97,38.47],[71.59,37.9],[71.68,36.68],[73.31,37.46],[74.92,37.24]]]]},"properties":{"name":"Afghanistan"},"id":"AF"}, | |
{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[19.44,41.02],[19.37,41.85],[19.65,42.62],[20.07,42.56],[20.59,41.88],[20.82,40.91],[20.98,40.86],[20.01,39.69],[19.29,40.42],[19.44,41.02]]]]},"properties":{"name":"Albania"},"id":"AL"}, | |
{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[2.96,36.8],[8.62,36.94],[8.18,36.52],[8.25,34.64],[7.49,33.89],[9.06,3 |
Number.prototype.yoString = function() { | |
return 'Yo, ' + this + '!'; | |
}; | |
var num = 3; | |
console.log(num.yoString()); |
/* | |
An attempt at fixing the dreaded iOS orientationchange zoom bug http://adactio.com/journal/5088/. Seems to work! | |
Authored by @scottjehl | |
MIT License. | |
*/ | |
(function(w){ | |
var doc = w.document; | |
if( !doc.querySelectorAll ){ return; } |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>beforeRunningCommand</key> | |
<string>nop</string> | |
<key>bundleUUID</key> | |
<string>C9BD1ADE-4FD9-4842-A641-DFB373B7D42C</string> | |
<key>command</key> | |
<string>#!/usr/bin/env ruby |
#!/bin/sh | |
validate_ref() | |
{ | |
# --- Arguments | |
oldrev=$(git rev-parse $1) | |
newrev=$(git rev-parse $2) | |
refname="$3" | |
# oldrev could be 0s which means creating refname |
#!/bin/sh | |
echo " | |
Cool, let's start. | |
" | |
src=$PWD |