どういうdata-carouselType
意味か教えていただけますか?
<div class="Carousel" data-carselType="magazine">
彼らは(jQueryコードで)使用しました:
if ($this.attr("data-carselType") === "magazine") {
$(prevBtn).addClass("opaque");
$(nextBtn).addClass("opaque");
this.appendChild(prevBtn);
this.appendChild(nextBtn);
pagerWidth = $(prevBtn).width();
childLength = $kids.children().length;
$kids.css("left", pagerWidth + "px").children("div").addClass("grouping");
childWidth = $kids.children("div").width();
leftMagTitle = document.createElement("div");
rightMagTitle = document.createElement("div");
prevBtn.appendChild(leftMagTitle);
nextBtn.appendChild(rightMagTitle);
$kids.width(childLength * childWidth);
$kids.children(":first-child").addClass("active");
$kids.css("left", (pagerWidth - $this.find(".caroContainer").children("div").width()) + "px");
forPrependingOne = $kids.children(":eq(" + (childLength - 1) + ")").clone();
$kids.children(":eq(" + (childLength - 1) + ")").remove();
$kids.prepend(forPrependingOne);
$kids.click(function (e) {
link = $(e.target).parents(this).children("a").attr("href");
if ($(e.target).parents(this) && e.target.tagName !== "IMG" && e.target.tagName !== "INPUT" && e.target.tagName !== "A" && link !== undefined) {
e.preventDefault();
document.location = link;
}
});
lazyLoad();