Last active
August 30, 2015 09:19
-
-
Save kenzo0107/871a8dc41105209ee38c to your computer and use it in GitHub Desktop.
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
{{set . "title" "画像アップロード"}} | |
<img src="{{ .profileImgUrl }}" class="thumb"/> | |
{{template "header.html" .}} | |
<form class="form_img_upload" method="POST" enctype="multipart/form-data" onSubmit="return upload(this);"> | |
<input type="file" name="imgFile" accept="image/jpeg,image/gif,image/png"/> | |
<p> | |
<button class="ajax_execute" data-form="form_img_upload" data-action="/img/upload_execute" data-mode="img_upload">アップロード</button> | |
</p> | |
</form> | |
<script type="text/javascript" src="/public/js/ajax.js"></script> | |
<script type="text/javascript" src="/public/js/jquery.uploadThumbs.js"></script> | |
<script type="text/javascript"> | |
$(function() { | |
// jQuery Upload Thumbs | |
$('.form_img_upload input:file').uploadThumbs({ | |
position : 2, // 0:before, 1:after, 2:parent.prepend, 3:parent.append, | |
// any: arbitrarily jquery selector | |
imgbreak : false // append <br> after thumbnail images | |
}); | |
}); | |
</script> | |
{{template "footer.html" .}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment