Skip to content

Instantly share code, notes, and snippets.

@shaojunda
Created June 20, 2017 15:54
Show Gist options
  • Save shaojunda/c68b7cfcccd8b72305ed835324292699 to your computer and use it in GitHub Desktop.
Save shaojunda/c68b7cfcccd8b72305ed835324292699 to your computer and use it in GitHub Desktop.
$(function() {
var imgArray = [];
var currentPage = 1;
var frameId = 1;
var decoratePic = "";
var gid = $("#gid").val();
$("#framePic").on("click", function() {
chooseHandler("framePic");
})
function chooseHandler(chooseType) {
imgArray = []
switch (chooseType) {
case "framePic":
toggleFramePic();
break;
case "puzzlePic":
togglePuzzlePic();
break;
}
}
function toggleFramePic() {
if (!$(".imgList").hasClass("pending")) {
$(".imgList").toggleClass("chooseOne").find("li.active").removeClass("active");
$("footer").toggleClass("sticky").find(".decoration").toggleClass("hidden");
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment