Skip to content

Instantly share code, notes, and snippets.

View Aufree's full-sized avatar
:octocat:
>(0.0)<

Aufree Aufree

:octocat:
>(0.0)<
  • Freelancer
  • ShenZhen, China
View GitHub Profile
@Aufree
Aufree / ImagePreview.js
Created October 10, 2014 13:07
Preview image before uploading in jquery
function readURL(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function(e) {
$('#previewHolder').attr('src', e.target.result);
}
reader.readAsDataURL(input.files[0]);
}
}
@Aufree
Aufree / config.js
Last active August 29, 2015 14:07
The basic configuration of easy-emoji
$(function(){
emojify.setConfig({
img_dir: '/images/emoji',
ignored_tags: {
'SCRIPT': 1,
'TEXTAREA': 1,
'A': 1,
'PRE': 1,
'CODE': 1
}