Sha256: d2d3d9c49a4d5147f3fd590590bc171722e32e15b7ab1ccdf023932b4f9622b7
Contents?: true
Size: 854 Bytes
Versions: 14
Compression:
Stored size: 854 Bytes
Contents
function buttonhandler() { $(".like-btn, .flag-confirm").click(function(e) { button = $(this); imageId = $(".fancybox-wrap, .image-show").attr("id"); if (!$(button).is(".already-clicked")) { url = $(button).attr("href"); $.post(url, function() { $(button).addClass("already-clicked"); $("#" + imageId + " .text-overlay").find(".initial-state").addClass("already-clicked"); }); } if ($(button).is(".like-btn")) { $("#" + imageId + " .like-btn").toggle(); } else if ($(button).is(".flag-confirm")) { $("#" + imageId + " .flag-btn.initial-state").remove(); $("#" + imageId + " .flag-btn.secondary-state").show(); $('.modal').modal('hide'); } e.preventDefault(); }); }
Version data entries
14 entries across 14 versions & 1 rubygems