Change size on image upload
This commit is contained in:
parent
2fd57e8f9a
commit
e6e1492230
1 changed files with 5 additions and 1 deletions
|
@ -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);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Reference in a new issue