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
String.prototype.format = function() { | |
var formatted = this; | |
for (var i = 0; i < arguments.length; i++) { | |
var regexp = new RegExp('\\{'+i+'\\}', 'gi'); | |
formatted = formatted.replace(regexp, arguments[i]); | |
} | |
return formatted; | |
}; |
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
<!-- A scaffolded edit view converted to mustache --> | |
<h1>Editing post</h1> | |
{{#form}} | |
{{#errors?}} | |
<div id="error_explanation"> | |
<h2>{{error_header}}</h2> | |
</div> | |
<ul> |
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 TextChange Plugin | |
* http://www.zurb.com/playground/jquery-text-change-custom-event | |
* | |
* Copyright 2010, ZURB | |
* Released under the MIT License | |
*/ | |
(function ($) { | |
$.event.special.textchange = { |