Skip to content

Instantly share code, notes, and snippets.

@univdev
univdev / common.css
Last active September 21, 2017 10:05
20170921_ajax ์‹ค์Šต
#header {
background: #EEE;
padding: 20px 0;
}
.canvas_place .canvas_place__option {
padding: 10px 0;
text-align: right;
font-size: .9em;
}
@univdev
univdev / Fupload.php
Created September 6, 2017 10:59
20170906_Drag and Drop
<?php
include_once $_SERVER['DOCUMENT_ROOT']."/app/helper/lib.php";
$files = $_FILES['files'];
$cnt = count($files['name']);
$uploaded = [];
for($i = 0; $i < $cnt; $i++) {
$name = $files['name'][$i];
@univdev
univdev / common.js
Created September 6, 2017 09:24
20170906_ajax and formdata
( function() {
function App() {
}
App.prototype = {
notice: {
update: function(data) {
$.ajax({
@univdev
univdev / index.php
Last active August 30, 2017 09:55
20170830_ajax ์‹ค์Šต
<?php include_once($_SERVER['DOCUMENT_ROOT']."/app/helper/lib.php"); ?>
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<title>Ajax</title>
<link rel="stylesheet" href="assets/css/common.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
</head>
@univdev
univdev / index.php
Created July 31, 2017 07:49
20170731_๋กœ๊ทธ์ธ_์˜ˆ์ œ
<?php
error_reporting(0);
session_start();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>๋กœ๊ทธ์ธ</title>
@univdev
univdev / common.js
Created July 26, 2017 08:08
20170726_์บ”๋ฒ„์Šค_ํŒŒ์ด๊ทธ๋ž˜ํ”„
// common.js
var cvs = document.getElementById('cvs'),
ctx = cvs.getContext('2d');
var data = [10, 40, 10, 10, 10],
sum = data.reduce(function(prv, crv) {
return prv + crv;
});
@univdev
univdev / common.js
Created July 26, 2017 07:43
20170726_์บ”๋ฒ„์Šค_๊บพ์€์„ ๊ทธ๋ž˜ํ”„
// common.js
var cvs = document.getElementById('cvs'),
ctx = cvs.getContext('2d');
var data = [20, 70, 20, 40 ,60],
width = cvs.width / data.length,
max = Math.max.apply(null, data);
ctx.moveTo(0, cvs.height);
@univdev
univdev / common.css
Created July 26, 2017 06:56
20170726_์นด๋“œ๋’ค์ง‘๊ธฐ
/* Common.css */
.flip-container {
perspective: 1000px;
}
.flip-container .flipper {
width: 300px;
height: 300px;
position: relative;
transition: 1s all;
@univdev
univdev / script.js
Created July 19, 2017 09:55
20170719_jQuery Slide and power example
/**
* 20170627 common.js
* ๋ฐ˜๋“œ์‹œ ์ด ๋ฌธ์„œ์˜ ๋‚ด์šฉ๋งŒ ์ˆ˜์ •ํ•˜์—ฌ ์ž‘์—…ํ•˜์„ธ์š”.
*/
$(document).ready(function() {
var cnt = 0;
var slideWrap = $('.slide__wrap'),
@univdev
univdev / common.js
Last active June 21, 2017 10:27
20170621_jQuery_slide_example
$(document).ready(function() {
var slideWrap = $('#slideWrap'),
slideMover = slideWrap.find('.slide_mover'),
slideMoverChild = slideMover.find('.slide_mover__child'),
slideArrowWrap = slideWrap.find('.slide_arrow_wrap'),
slideArrowLeft = slideArrowWrap.find('.slide_arrow__left'),
slideArrowRight = slideArrowWrap.find('.slide_arrow__right'),
position = 0,
timeout = null;