From 717f7cb44fcb4251299d91690ec322506bacaf83 Mon Sep 17 00:00:00 2001 From: hitanshs <71921398+hitanshs@users.noreply.github.com> Date: Mon, 5 Oct 2020 17:32:20 +0530 Subject: [PATCH] Update script.js added elseif conditional statement --- script.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/script.js b/script.js index 98da96f..e892631 100644 --- a/script.js +++ b/script.js @@ -37,6 +37,10 @@ $(document).ready(function(){ $(this).removeClass("far"); $(this).addClass("fas"); $(this).css("color","red"); + }elseif($dataLiked == 1){ + $(this).removeClass("fas"); + $(this).addClass("far"); + $(this).css("color","#444"); }else{ $(this).removeClass("fas"); $(this).addClass("far"); @@ -45,4 +49,4 @@ $(document).ready(function(){ }); -}); \ No newline at end of file +});