포토리뷰 작업 중
This commit is contained in:
@@ -439,20 +439,34 @@ $(document).ready(function () {
|
||||
|
||||
//문의하기 글자 수 제한
|
||||
var maxInquiryContentsCount = 1000;
|
||||
|
||||
// 글자수 체크 및 업데이트 함수
|
||||
function updateInquiryContentsCount($element, showAlert) {
|
||||
let content = $element.val() || "";
|
||||
let contentLength = content.length;
|
||||
|
||||
// 최대 글자수 초과 시 자르기
|
||||
if (contentLength > maxInquiryContentsCount) {
|
||||
content = content.substring(0, maxInquiryContentsCount);
|
||||
$element.val(content);
|
||||
contentLength = maxInquiryContentsCount;
|
||||
if (showAlert) {
|
||||
alert("글자수는 " + maxInquiryContentsCount + "자까지 입력 가능합니다.");
|
||||
}
|
||||
}
|
||||
|
||||
// 글자수 표시 업데이트
|
||||
$(".textCount").html(`<em>${contentLength}</em>/${maxInquiryContentsCount}자`);
|
||||
}
|
||||
|
||||
// 이벤트 리스너
|
||||
$(".inquiryContents").on("change keyup paste", function (e) {
|
||||
let content = $(this).val();
|
||||
updateInquiryContentsCount($(this), true);
|
||||
});
|
||||
|
||||
if (content.length == 0 || content == "") {
|
||||
$(".textCount").html(`<em>0</em>/${maxInquiryContentsCount}자`);
|
||||
} else {
|
||||
$(".textCount").html(`<em>${content.length}</em>/${maxInquiryContentsCount}자`);
|
||||
}
|
||||
|
||||
if (content.length > maxInquiryContentsCount) {
|
||||
$(this).val($(this).val().substring(0, maxInquiryContentsCount));
|
||||
$(".textCount").html(`<em>${maxInquiryContentsCount}</em>/${maxInquiryContentsCount}자`);
|
||||
alert("글자수는 " + maxInquiryContentsCount + "자까지 입력 가능합니다.");
|
||||
}
|
||||
// 페이지 로드 시 초기값이 있으면 글자수 체크
|
||||
$(".inquiryContents").each(function () {
|
||||
updateInquiryContentsCount($(this), false);
|
||||
});
|
||||
|
||||
// 문의하기 이미지 미리보기
|
||||
@@ -1096,7 +1110,9 @@ function close_layer_popup(popid) {
|
||||
//[S]PDP 리뷰 더보기 관련
|
||||
more_contents_chk();
|
||||
function more_contents_chk() {
|
||||
console.log("여기 호출해");
|
||||
$(".reviewItem").each(function (index, item) {
|
||||
console.log("여기 호출해22", $(this).find(".contents").height());
|
||||
if ($(item).find(".contents").height() >= 74) {
|
||||
$(item).find(".contents").addClass("abstracted");
|
||||
$(item).find(".contentMoreBtn").css("display", "flex");
|
||||
|
||||
Reference in New Issue
Block a user