Change size on image upload

This commit is contained in:
Jake Howard 2015-12-25 20:41:45 +00:00
parent 2fd57e8f9a
commit e6e1492230

View file

@ -26,7 +26,11 @@ $('footer .btn').click(function(e) {
$('footer input').on('change', function () { $('footer input').on('change', function () {
const file = $(this)[0].files[0]; const file = $(this)[0].files[0];
let reader = new FileReader(); let reader = new FileReader();
reader.onload = function(e) { $('#compass').attr('src', e.target.result); }; reader.onload = function(e) {
$('#compass').attr('src', e.target.result);
$('#compass').css('width', '78vw');
$('.header').hide();
};
reader.readAsDataURL(file); reader.readAsDataURL(file);
}); });