겔러리 앨범에서요~ 좌우 클릭시 이미지 가로사이즈가 조절이 안되는데요~ 정보
겔러리 앨범에서요~ 좌우 클릭시 이미지 가로사이즈가 조절이 안되는데요~
관련링크
본문
겔러리 앨범에서요~ 좌우 클릭시 이미지 가로사이즈가 조절이 안되는데요~
링크참고하시면요~
좌우 클릭시 이미지가 원본으로 보이는데요~
사이즈 조절할려면 어떻게해야할까요??
>>>
소스
<div id="gallery" class="content">
<div id="controls" class="controls"></div>
<div class="slideshow-container">
<div id="loading" class="loader"></div>
<div id="slideshow" class="slideshow"></div>
</div>
</div>
이미지 쇼나오는 div 부분
>>> 제이쿼리 부분
var gallery = this;
// Now check for preloadAhead count
var preloadCount = currentIndex - startIndex;
if (preloadCount < 0)
preloadCount = this.data.length-1-startIndex+currentIndex;
if (this.preloadAhead >= 0 && preloadCount > this.preloadAhead) {
// Do this in order to keep checking for relocated start index
setTimeout(function() { gallery.preloadRecursive(startIndex, currentIndex); }, 500);
return this;
}
var imageData = this.data[currentIndex];
if (!imageData)
return this;
// If already loaded, continue
if (imageData.image)
return this.preloadNext(startIndex, currentIndex);
// Preload the image
var image = new Image();
image.onload = function() {
imageData.image = this;
gallery.preloadNext(startIndex, currentIndex);
};
image.alt = imageData.title;
image.src = imageData.slideUrl;
var Contents = $('.slideshow');
var imgs = Contents.find('img');
imgs.each(function (i) {
var width = $(this).attr('width');
var height = $(this).attr('height');
//if(width > 350)
width=350;
//if(height > 350)
height=350;
$(this).attr('width', width);
$(this).attr('height', height);
});
return this;
>>
image.alt = imageData.title;
image.src = imageData.slideUrl;
이부분에서 이미지의 원본만 불러오게 되어있어서요
고수님들 굽신굽신 도와주실분~~
링크참고하시면요~
좌우 클릭시 이미지가 원본으로 보이는데요~
사이즈 조절할려면 어떻게해야할까요??
>>>
소스
<div id="gallery" class="content">
<div id="controls" class="controls"></div>
<div class="slideshow-container">
<div id="loading" class="loader"></div>
<div id="slideshow" class="slideshow"></div>
</div>
</div>
이미지 쇼나오는 div 부분
>>> 제이쿼리 부분
var gallery = this;
// Now check for preloadAhead count
var preloadCount = currentIndex - startIndex;
if (preloadCount < 0)
preloadCount = this.data.length-1-startIndex+currentIndex;
if (this.preloadAhead >= 0 && preloadCount > this.preloadAhead) {
// Do this in order to keep checking for relocated start index
setTimeout(function() { gallery.preloadRecursive(startIndex, currentIndex); }, 500);
return this;
}
var imageData = this.data[currentIndex];
if (!imageData)
return this;
// If already loaded, continue
if (imageData.image)
return this.preloadNext(startIndex, currentIndex);
// Preload the image
var image = new Image();
image.onload = function() {
imageData.image = this;
gallery.preloadNext(startIndex, currentIndex);
};
image.alt = imageData.title;
image.src = imageData.slideUrl;
var Contents = $('.slideshow');
var imgs = Contents.find('img');
imgs.each(function (i) {
var width = $(this).attr('width');
var height = $(this).attr('height');
//if(width > 350)
width=350;
//if(height > 350)
height=350;
$(this).attr('width', width);
$(this).attr('height', height);
});
return this;
>>
image.alt = imageData.title;
image.src = imageData.slideUrl;
이부분에서 이미지의 원본만 불러오게 되어있어서요
고수님들 굽신굽신 도와주실분~~
댓글 전체
imgs.each(function (i) {
var width = $(this).attr('width');
var height = $(this).attr('height');
if(width > 350)
width=350;
if(height > 350)
height=350;
$(this).attr('width', width);
$(this).attr('height', height);
});
이부분이 안먹히는건가요???
var width = $(this).attr('width');
var height = $(this).attr('height');
if(width > 350)
width=350;
if(height > 350)
height=350;
$(this).attr('width', width);
$(this).attr('height', height);
});
이부분이 안먹히는건가요???
클릭했을대 원본이미지 나왔다가 다시 줄어들어서요~ 줄이들기는한데요 클릭시 고정크기로 보여주면되는데 그게 쉽지가 않네요~~