부모님의 경계를 초과하지 않는 방법을 알아낼 수있는이 코드가 있습니다.부모님이 빠져 나오지 못하게하는 방법 div
객체는 드래그 가능하고 슬라이더로 크기를 조절하지만 어떻게 할 수 있습니까? 감사합니다.
$(document).on("input change",'.image-slider', function() {
$('#timelineBGload-perfil').draggable();
var slider = parseInt($(this).val());
var height1 = $('#timelineBGload-perfil').height();
var width1 = $('#timelineBGload-perfil').width();
var percent1 = width1/600 * 100;
var jeje = slider - 191;
var jeje2 = slider - 191;
$('#timelineBGload-perfil').css({'width': slider,'height':'auto'});
$('#timelineBGload-perfil').css({'left': '-'+ jeje +'px','top': '-'+ jeje2 +'px'});
});
https://jsfiddle.net/fypqgym1/
jsfiddle에서 작업 중입니다. – Fil
크기가 조정될 때까지 작업 –
작동 시키셨습니까? – Scott