From 4a7f0aa36e6779173a5fd3ab39a9088353dbbe52 Mon Sep 17 00:00:00 2001 From: bandya2003 <61108642+bandya2003@users.noreply.github.com> Date: Fri, 28 Oct 2022 20:20:05 +0530 Subject: [PATCH] Updated Index.js File Worked on the Production Description Card. You can view the card in different angles if wanted Background Shades can be added to it. --- Gym_Website/index.js | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Gym_Website/index.js diff --git a/Gym_Website/index.js b/Gym_Website/index.js new file mode 100644 index 0000000..13bfc8a --- /dev/null +++ b/Gym_Website/index.js @@ -0,0 +1,39 @@ +jQuery(document).ready(function ($) { + //Buy button effects + $(".buy").on("click", function () { + //It is possible to put the 1st argument of setTimeout as callback of the Materialize.toast function but that approach seems significantly slower. I don't know why yet + setTimeout(function () { + $("#buy").removeClass("green"); + $(".buy").fadeOut(100, function () { + $(this).text("add_shopping_cart").fadeIn(150); + }); + }, 5000); + + $("#buy").addClass("green"); + $(".buy").fadeOut(100, function () { + $(this).text("check").fadeIn(150); + }); + + var $toastContent = $( + '