Почему бы перетаскивать каждый раз каждый раз, когда я его перемещаю? я сделал снимок, чтобы показать вам, что я имею в виду. это происходит каждый раз, когда я перемещаю размер изображения на шлеме, это не проблема, только когда я перетаскиваю изображение здесь, это мой скрипт, только если вам нужно больше, пожалуйста, не стесняйтесь спрашивать спасибо.draggable умножает каждый раз, когда я его перемещаю
<script>// External added
jQuery(download).ready(function() {
jQuery(".file-upload-wrapper").hide();
jQuery(".out-put-img1").hide();
jQuery("#imajes45").change(function() {
var selected = jQuery('#imajes45').val();
if (selected == "new-upload") {
jQuery(".file-upload-wrapper").show();
} else {
jQuery(".file-upload-wrapper").hide();
}
});
//File
function readURL(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function (e) {
jQuery(".out-put-img1").show();
$('#output1').attr('src', e.target.result);
// /$('.append-img').append('src', e.target.result);
}
reader.readAsDataURL(input.files[0]);
}
}
jQuery("#upload-img1").change(function() {
readURL(this);
\t \t \t
\t $(".samson").draggable();
$(".out-put-img1").resizable();
\t
});
});
</script>
<script>
// External added
jQuery(download).ready(function() {
jQuery(".file-upload-wrapper1").hide();
jQuery(".out-put-img2").hide();
jQuery("#imajes45").change(function() {
var selected = jQuery('#imajes45').val();
if (selected == "new-upload") {
jQuery(".file-upload-wrapper1").show();
} else {
jQuery(".file-upload-wrapper1").hide();
}
});
//File
function readURL(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function (e) {
jQuery(".out-put-img2").show();
$('#output2').attr('src', e.target.result);
// /$('.append-img').append('src', e.target.result);
}
reader.readAsDataURL(input.files[0]);
}
}
jQuery("#upload-img2").change(function() {
readURL(this);
\t \t \t
\t \t $(".dragbal1").draggable();
$(".out-put-img2").resizable();
\t \t
\t \t
});
});
</script>
<script>
// External added
jQuery(download).ready(function() {
jQuery(".file-upload-wrapper2").hide();
jQuery(".out-put-img4").hide();
jQuery("#imajes45").change(function() {
var selected = jQuery('#imajes45').val();
if (selected == "new-upload") {
jQuery(".file-upload-wrapper2").show();
} else {
jQuery(".file-upload-wrapper2").hide();
}
});
//File
function readURL(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function (e) {
jQuery(".out-put-img4").show();
$('#output4').attr('src', e.target.result);
// /$('.append-img').append('src', e.target.result);
}
reader.readAsDataURL(input.files[0]);
}
}
jQuery("#upload-img4").change(function() {
readURL(this);
\t \t \t
\t $(".chinass2").draggable();
$(".out-put-img4").resizable();
\t \t
});
});
</script>
Вы можете добавить рабочий jsfiddle или фрагмент? –
Вот моя скрипка, но она не работает должным образом. https://jsfiddle.net/2taya76y/2/ – xcalliber
Какой элемент перетаскивается в скрипке? картинка не кажется перетаскиваемой. –