jquery 도와주세요!!
갤러리 게시판입니다.
next, prev 버튼이 hover되지않고 항상 보이게 하고 싶은데
어떻게해야할까요 ㅠㅠ
function _set_navigation() {
$('#lightbox-nav').show();
// Instead to define this configuration in CSS file, we define here. And it큦 need to IE. Just.
$('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
// Show the prev button, if not the first image in set
if ( settings.activeImage != 0 ) {
if ( settings.fixedNavigation ) {
$('#lightbox-nav-btnPrev').css({ 'background' : 'url(' + settings.imageBtnPrev + ') left 15% no-repeat' })
.unbind()
.bind('click',function() {
settings.activeImage = settings.activeImage - 1;
_set_image_to_view();
return false;
});
} else {
// Show the images button for Next buttons
$('#lightbox-nav-btnPrev').unbind().hover(function() {
$(this).css({ 'background' : 'url(' + settings.imageBtnPrev + ') left 15% no-repeat' });
},function() {
$(this).css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
}).show().bind('click',function() {
settings.activeImage = settings.activeImage - 1;
_set_image_to_view();
return false;
});
}
}
// Show the next button, if not the last image in set
if ( settings.activeImage != ( settings.imageArray.length -1 ) ) {
if ( settings.fixedNavigation ) {
$('#lightbox-nav-btnNext').css({ 'background' : 'url(' + settings.imageBtnNext + ') right 15% no-repeat' })
.unbind()
.bind('click',function() {
settings.activeImage = settings.activeImage + 1;
_set_image_to_view();
return false;
});
} else {
// Show the images button for Next buttons
$('#lightbox-nav-btnNext').unbind().hover(function() {
$(this).css({ 'background' : 'url(' + settings.imageBtnNext + ') right 15% no-repeat' });
},function() {
$(this).css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
}).show().bind('click',function() {
settings.activeImage = settings.activeImage + 1;
_set_image_to_view();
return false;
});
}
}
// Enable keyboard navigation
_enable_keyboard_navigation();
}
next, prev 버튼이 hover되지않고 항상 보이게 하고 싶은데
어떻게해야할까요 ㅠㅠ
function _set_navigation() {
$('#lightbox-nav').show();
// Instead to define this configuration in CSS file, we define here. And it큦 need to IE. Just.
$('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
// Show the prev button, if not the first image in set
if ( settings.activeImage != 0 ) {
if ( settings.fixedNavigation ) {
$('#lightbox-nav-btnPrev').css({ 'background' : 'url(' + settings.imageBtnPrev + ') left 15% no-repeat' })
.unbind()
.bind('click',function() {
settings.activeImage = settings.activeImage - 1;
_set_image_to_view();
return false;
});
} else {
// Show the images button for Next buttons
$('#lightbox-nav-btnPrev').unbind().hover(function() {
$(this).css({ 'background' : 'url(' + settings.imageBtnPrev + ') left 15% no-repeat' });
},function() {
$(this).css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
}).show().bind('click',function() {
settings.activeImage = settings.activeImage - 1;
_set_image_to_view();
return false;
});
}
}
// Show the next button, if not the last image in set
if ( settings.activeImage != ( settings.imageArray.length -1 ) ) {
if ( settings.fixedNavigation ) {
$('#lightbox-nav-btnNext').css({ 'background' : 'url(' + settings.imageBtnNext + ') right 15% no-repeat' })
.unbind()
.bind('click',function() {
settings.activeImage = settings.activeImage + 1;
_set_image_to_view();
return false;
});
} else {
// Show the images button for Next buttons
$('#lightbox-nav-btnNext').unbind().hover(function() {
$(this).css({ 'background' : 'url(' + settings.imageBtnNext + ') right 15% no-repeat' });
},function() {
$(this).css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
}).show().bind('click',function() {
settings.activeImage = settings.activeImage + 1;
_set_image_to_view();
return false;
});
}
}
// Enable keyboard navigation
_enable_keyboard_navigation();
}
댓글 2개
HackYa
12년 전
jQuery 에서 .show() 를 사용하려면
http://api.jquery.com/show/
show, 말 그대로 보여라 라는 명령어이기 때문에 일단 감춰야 됩니다.
감추는 부분을 .hide
http://api.jquery.com/hide/
로 처리할 수 도 있지만,
css 로 감출수도 있습니다. 저는 대체적으로 css 로 처리합니다만, 다른 jQuery 저자들은 .hide 를 사용하기도 합니다.
슬라이더를 볼수 없으니 그냥 아, 어떻게 감추고 보여주고 있구나 대충 예상만 할뿐 정확한 답변은 드릴수 없는 문제 입니다.
물론 저 슬라이더의 저자라면 쉽게 답변을 드릴 수 있겠죠.
http://api.jquery.com/show/
show, 말 그대로 보여라 라는 명령어이기 때문에 일단 감춰야 됩니다.
감추는 부분을 .hide
http://api.jquery.com/hide/
로 처리할 수 도 있지만,
css 로 감출수도 있습니다. 저는 대체적으로 css 로 처리합니다만, 다른 jQuery 저자들은 .hide 를 사용하기도 합니다.
슬라이더를 볼수 없으니 그냥 아, 어떻게 감추고 보여주고 있구나 대충 예상만 할뿐 정확한 답변은 드릴수 없는 문제 입니다.
물론 저 슬라이더의 저자라면 쉽게 답변을 드릴 수 있겠죠.
돼지코구뇽
12년 전
// Show the images button for Next buttons
$('#lightbox-nav-btnPrev').unbind().a(function() {
$(this).css({ 'background' : 'url(' + settings.imageBtnPrev + ') left 15% no-repeat' });
},function() {
$(this).css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
}).show().bind('click',function() {
settings.activeImage = settings.activeImage - 1;
_set_image_to_view();
return false;
});
}
}
// Show the next button, if not the last image in set
if ( settings.activeImage != ( settings.imageArray.length -1 ) ) {
if ( settings.fixedNavigation ) {
$('#lightbox-nav-btnNext').css({ 'background' : 'url(' + settings.imageBtnNext + ') right 15% no-repeat' })
.unbind()
.bind('click',function() {
settings.activeImage = settings.activeImage + 1;
_set_image_to_view();
return false;
});
} else {
// Show the images button for Next buttons
$('#lightbox-nav-btnNext').unbind().a(function() {
$(this).css({ 'background' : 'url(' + settings.imageBtnNext + ') right 15% no-repeat' });
},function() {
$(this).css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
}).show().bind('click',function() {
settings.activeImage = settings.activeImage + 1;
_set_image_to_view();
return false;
});
}
}
추가
$('#lightbox-nav-btnPrev').unbind().a(function() {
$(this).css({ 'background' : 'url(' + settings.imageBtnPrev + ') left 15% no-repeat' });
},function() {
$(this).css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
}).show().bind('click',function() {
settings.activeImage = settings.activeImage - 1;
_set_image_to_view();
return false;
});
}
}
// Show the next button, if not the last image in set
if ( settings.activeImage != ( settings.imageArray.length -1 ) ) {
if ( settings.fixedNavigation ) {
$('#lightbox-nav-btnNext').css({ 'background' : 'url(' + settings.imageBtnNext + ') right 15% no-repeat' })
.unbind()
.bind('click',function() {
settings.activeImage = settings.activeImage + 1;
_set_image_to_view();
return false;
});
} else {
// Show the images button for Next buttons
$('#lightbox-nav-btnNext').unbind().a(function() {
$(this).css({ 'background' : 'url(' + settings.imageBtnNext + ') right 15% no-repeat' });
},function() {
$(this).css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
}).show().bind('click',function() {
settings.activeImage = settings.activeImage + 1;
_set_image_to_view();
return false;
});
}
}
추가
게시판 목록
그누4 질문답변
그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.
기존 게시물은 열람만 가능합니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 66474 | 11년 전 | 3617 | ||
| 66473 | 11년 전 | 2669 | ||
| 66472 | 11년 전 | 4860 | ||
| 66471 |
hoonii
|
11년 전 | 4435 | |
| 66470 | 11년 전 | 2249 | ||
| 66469 | 11년 전 | 3104 | ||
| 66468 |
100볼트
|
11년 전 | 3096 | |
| 66467 |
몬스터박스
|
11년 전 | 2112 | |
| 66466 |
몬스터박스
|
11년 전 | 2657 | |
| 66465 |
lsj9894
|
11년 전 | 2438 | |
| 66464 |
테크노관리자
|
11년 전 | 2847 | |
| 66463 | 11년 전 | 2875 | ||
| 66462 |
커네드커네드
|
11년 전 | 3227 | |
| 66461 | 11년 전 | 2641 | ||
| 66460 | 11년 전 | 3309 | ||
| 66459 |
narasarang
|
11년 전 | 2603 | |
| 66458 |
AnnieK
|
11년 전 | 3366 | |
| 66457 | 11년 전 | 3232 | ||
| 66456 | 11년 전 | 2084 | ||
| 66455 | 11년 전 | 3257 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기