'click' event only fires on first click and not second











up vote
0
down vote

favorite












I have five elements and want something to happend when I click one of them. My code works fine when clicking for first time, but the event never hits on second click. Any idea why?






$("#ratingModal").find(".star.clickable").on("click", function () {
console.log("click");

var $wrap = $(this).closest(".stars");
var count = parseInt($(this).data("star"));

$.each($wrap.find(".star"), function ($index, $itm) {
let current = parseInt($($itm).data("star"));

$($itm).removeClass("fas");
$($itm).removeClass("far");

console.log(current);

if (current <= count) {
$($itm).addClass("fas");

console.log("fas");
}
else {
$($itm).addClass("far");

console.log("far");
}
});
});

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">

<div id="ratingModal">
<div class="body">
<div class="score-wrap">
<span class="label">Score: </span>
<div class="stars">
<i class="fas fa-star clickable star star-1" title="1" data-star="1"></i>
<i class="far fa-star clickable star star-2" title="2" data-star="2"></i>
<i class="far fa-star clickable star star-3" title="3" data-star="3"></i>
<i class="far fa-star clickable star star-4" title="4" data-star="4"></i>
<i class="far fa-star clickable star star-5" title="5" data-star="5"></i>
</div>
</div>
</div>
</div>












share|improve this question




















  • 2




    I just tried this and it worked perfectly fine for me. Can you post a minimal working example?
    – vrugtehagel
    Nov 7 at 17:33










  • Side note; the use of prevAll() and nextAll() could reduce your need for the $.each
    – Taplar
    Nov 7 at 17:36










  • yes I see it works in the snippet. so I guess there's something else wrong.
    – TheRuler
    Nov 7 at 17:45










  • Normally when the event doesn't fire the second time it's because you're overwriting the elements that the event is attached to (eg via a $("..").html(...) or changing the classes that the event applies to (when using event delegation). Your snippet does not do this and does not demonstrate the problem (ie it works fine).
    – freedomn-m
    Nov 7 at 17:46












  • after some debugging it appears that after adding a class name the event doesn't fire. if I run the code without adding "fas" or "far" as class name it fires every time
    – TheRuler
    Nov 7 at 18:20















up vote
0
down vote

favorite












I have five elements and want something to happend when I click one of them. My code works fine when clicking for first time, but the event never hits on second click. Any idea why?






$("#ratingModal").find(".star.clickable").on("click", function () {
console.log("click");

var $wrap = $(this).closest(".stars");
var count = parseInt($(this).data("star"));

$.each($wrap.find(".star"), function ($index, $itm) {
let current = parseInt($($itm).data("star"));

$($itm).removeClass("fas");
$($itm).removeClass("far");

console.log(current);

if (current <= count) {
$($itm).addClass("fas");

console.log("fas");
}
else {
$($itm).addClass("far");

console.log("far");
}
});
});

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">

<div id="ratingModal">
<div class="body">
<div class="score-wrap">
<span class="label">Score: </span>
<div class="stars">
<i class="fas fa-star clickable star star-1" title="1" data-star="1"></i>
<i class="far fa-star clickable star star-2" title="2" data-star="2"></i>
<i class="far fa-star clickable star star-3" title="3" data-star="3"></i>
<i class="far fa-star clickable star star-4" title="4" data-star="4"></i>
<i class="far fa-star clickable star star-5" title="5" data-star="5"></i>
</div>
</div>
</div>
</div>












share|improve this question




















  • 2




    I just tried this and it worked perfectly fine for me. Can you post a minimal working example?
    – vrugtehagel
    Nov 7 at 17:33










  • Side note; the use of prevAll() and nextAll() could reduce your need for the $.each
    – Taplar
    Nov 7 at 17:36










  • yes I see it works in the snippet. so I guess there's something else wrong.
    – TheRuler
    Nov 7 at 17:45










  • Normally when the event doesn't fire the second time it's because you're overwriting the elements that the event is attached to (eg via a $("..").html(...) or changing the classes that the event applies to (when using event delegation). Your snippet does not do this and does not demonstrate the problem (ie it works fine).
    – freedomn-m
    Nov 7 at 17:46












  • after some debugging it appears that after adding a class name the event doesn't fire. if I run the code without adding "fas" or "far" as class name it fires every time
    – TheRuler
    Nov 7 at 18:20













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have five elements and want something to happend when I click one of them. My code works fine when clicking for first time, but the event never hits on second click. Any idea why?






$("#ratingModal").find(".star.clickable").on("click", function () {
console.log("click");

var $wrap = $(this).closest(".stars");
var count = parseInt($(this).data("star"));

$.each($wrap.find(".star"), function ($index, $itm) {
let current = parseInt($($itm).data("star"));

$($itm).removeClass("fas");
$($itm).removeClass("far");

console.log(current);

if (current <= count) {
$($itm).addClass("fas");

console.log("fas");
}
else {
$($itm).addClass("far");

console.log("far");
}
});
});

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">

<div id="ratingModal">
<div class="body">
<div class="score-wrap">
<span class="label">Score: </span>
<div class="stars">
<i class="fas fa-star clickable star star-1" title="1" data-star="1"></i>
<i class="far fa-star clickable star star-2" title="2" data-star="2"></i>
<i class="far fa-star clickable star star-3" title="3" data-star="3"></i>
<i class="far fa-star clickable star star-4" title="4" data-star="4"></i>
<i class="far fa-star clickable star star-5" title="5" data-star="5"></i>
</div>
</div>
</div>
</div>












share|improve this question















I have five elements and want something to happend when I click one of them. My code works fine when clicking for first time, but the event never hits on second click. Any idea why?






$("#ratingModal").find(".star.clickable").on("click", function () {
console.log("click");

var $wrap = $(this).closest(".stars");
var count = parseInt($(this).data("star"));

$.each($wrap.find(".star"), function ($index, $itm) {
let current = parseInt($($itm).data("star"));

$($itm).removeClass("fas");
$($itm).removeClass("far");

console.log(current);

if (current <= count) {
$($itm).addClass("fas");

console.log("fas");
}
else {
$($itm).addClass("far");

console.log("far");
}
});
});

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">

<div id="ratingModal">
<div class="body">
<div class="score-wrap">
<span class="label">Score: </span>
<div class="stars">
<i class="fas fa-star clickable star star-1" title="1" data-star="1"></i>
<i class="far fa-star clickable star star-2" title="2" data-star="2"></i>
<i class="far fa-star clickable star star-3" title="3" data-star="3"></i>
<i class="far fa-star clickable star star-4" title="4" data-star="4"></i>
<i class="far fa-star clickable star star-5" title="5" data-star="5"></i>
</div>
</div>
</div>
</div>








$("#ratingModal").find(".star.clickable").on("click", function () {
console.log("click");

var $wrap = $(this).closest(".stars");
var count = parseInt($(this).data("star"));

$.each($wrap.find(".star"), function ($index, $itm) {
let current = parseInt($($itm).data("star"));

$($itm).removeClass("fas");
$($itm).removeClass("far");

console.log(current);

if (current <= count) {
$($itm).addClass("fas");

console.log("fas");
}
else {
$($itm).addClass("far");

console.log("far");
}
});
});

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">

<div id="ratingModal">
<div class="body">
<div class="score-wrap">
<span class="label">Score: </span>
<div class="stars">
<i class="fas fa-star clickable star star-1" title="1" data-star="1"></i>
<i class="far fa-star clickable star star-2" title="2" data-star="2"></i>
<i class="far fa-star clickable star star-3" title="3" data-star="3"></i>
<i class="far fa-star clickable star star-4" title="4" data-star="4"></i>
<i class="far fa-star clickable star star-5" title="5" data-star="5"></i>
</div>
</div>
</div>
</div>





$("#ratingModal").find(".star.clickable").on("click", function () {
console.log("click");

var $wrap = $(this).closest(".stars");
var count = parseInt($(this).data("star"));

$.each($wrap.find(".star"), function ($index, $itm) {
let current = parseInt($($itm).data("star"));

$($itm).removeClass("fas");
$($itm).removeClass("far");

console.log(current);

if (current <= count) {
$($itm).addClass("fas");

console.log("fas");
}
else {
$($itm).addClass("far");

console.log("far");
}
});
});

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">

<div id="ratingModal">
<div class="body">
<div class="score-wrap">
<span class="label">Score: </span>
<div class="stars">
<i class="fas fa-star clickable star star-1" title="1" data-star="1"></i>
<i class="far fa-star clickable star star-2" title="2" data-star="2"></i>
<i class="far fa-star clickable star star-3" title="3" data-star="3"></i>
<i class="far fa-star clickable star star-4" title="4" data-star="4"></i>
<i class="far fa-star clickable star star-5" title="5" data-star="5"></i>
</div>
</div>
</div>
</div>






javascript jquery






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 7 at 17:37









fqhv

1,0671821




1,0671821










asked Nov 7 at 17:27









TheRuler

388219




388219








  • 2




    I just tried this and it worked perfectly fine for me. Can you post a minimal working example?
    – vrugtehagel
    Nov 7 at 17:33










  • Side note; the use of prevAll() and nextAll() could reduce your need for the $.each
    – Taplar
    Nov 7 at 17:36










  • yes I see it works in the snippet. so I guess there's something else wrong.
    – TheRuler
    Nov 7 at 17:45










  • Normally when the event doesn't fire the second time it's because you're overwriting the elements that the event is attached to (eg via a $("..").html(...) or changing the classes that the event applies to (when using event delegation). Your snippet does not do this and does not demonstrate the problem (ie it works fine).
    – freedomn-m
    Nov 7 at 17:46












  • after some debugging it appears that after adding a class name the event doesn't fire. if I run the code without adding "fas" or "far" as class name it fires every time
    – TheRuler
    Nov 7 at 18:20














  • 2




    I just tried this and it worked perfectly fine for me. Can you post a minimal working example?
    – vrugtehagel
    Nov 7 at 17:33










  • Side note; the use of prevAll() and nextAll() could reduce your need for the $.each
    – Taplar
    Nov 7 at 17:36










  • yes I see it works in the snippet. so I guess there's something else wrong.
    – TheRuler
    Nov 7 at 17:45










  • Normally when the event doesn't fire the second time it's because you're overwriting the elements that the event is attached to (eg via a $("..").html(...) or changing the classes that the event applies to (when using event delegation). Your snippet does not do this and does not demonstrate the problem (ie it works fine).
    – freedomn-m
    Nov 7 at 17:46












  • after some debugging it appears that after adding a class name the event doesn't fire. if I run the code without adding "fas" or "far" as class name it fires every time
    – TheRuler
    Nov 7 at 18:20








2




2




I just tried this and it worked perfectly fine for me. Can you post a minimal working example?
– vrugtehagel
Nov 7 at 17:33




I just tried this and it worked perfectly fine for me. Can you post a minimal working example?
– vrugtehagel
Nov 7 at 17:33












Side note; the use of prevAll() and nextAll() could reduce your need for the $.each
– Taplar
Nov 7 at 17:36




Side note; the use of prevAll() and nextAll() could reduce your need for the $.each
– Taplar
Nov 7 at 17:36












yes I see it works in the snippet. so I guess there's something else wrong.
– TheRuler
Nov 7 at 17:45




yes I see it works in the snippet. so I guess there's something else wrong.
– TheRuler
Nov 7 at 17:45












Normally when the event doesn't fire the second time it's because you're overwriting the elements that the event is attached to (eg via a $("..").html(...) or changing the classes that the event applies to (when using event delegation). Your snippet does not do this and does not demonstrate the problem (ie it works fine).
– freedomn-m
Nov 7 at 17:46






Normally when the event doesn't fire the second time it's because you're overwriting the elements that the event is attached to (eg via a $("..").html(...) or changing the classes that the event applies to (when using event delegation). Your snippet does not do this and does not demonstrate the problem (ie it works fine).
– freedomn-m
Nov 7 at 17:46














after some debugging it appears that after adding a class name the event doesn't fire. if I run the code without adding "fas" or "far" as class name it fires every time
– TheRuler
Nov 7 at 18:20




after some debugging it appears that after adding a class name the event doesn't fire. if I run the code without adding "fas" or "far" as class name it fires every time
– TheRuler
Nov 7 at 18:20












1 Answer
1






active

oldest

votes

















up vote
0
down vote













Try Using off().on('...') function






$("#ratingModal").find(".star.clickable").off().on("click", function () {
console.log("click");

var $wrap = $(this).closest(".stars");
var count = parseInt($(this).data("star"));

$.each($wrap.find(".star"), function ($index, $itm) {
let current = parseInt($($itm).data("star"));

$($itm).removeClass("fas");
$($itm).removeClass("far");

console.log(current);

if (current <= count) {
$($itm).addClass("fas");

console.log("fas");
}
else {
$($itm).addClass("far");

console.log("far");
}
});
});

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">

<div id="ratingModal">
<div class="body">
<div class="score-wrap">
<span class="label">Score: </span>
<div class="stars">
<i class="fas fa-star clickable star star-1" title="1" data-star="1"></i>
<i class="far fa-star clickable star star-2" title="2" data-star="2"></i>
<i class="far fa-star clickable star star-3" title="3" data-star="3"></i>
<i class="far fa-star clickable star star-4" title="4" data-star="4"></i>
<i class="far fa-star clickable star star-5" title="5" data-star="5"></i>
</div>
</div>
</div>
</div>








share|improve this answer





















  • didnt make any difference
    – TheRuler
    Nov 7 at 20:26











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53194705%2fclick-event-only-fires-on-first-click-and-not-second%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













Try Using off().on('...') function






$("#ratingModal").find(".star.clickable").off().on("click", function () {
console.log("click");

var $wrap = $(this).closest(".stars");
var count = parseInt($(this).data("star"));

$.each($wrap.find(".star"), function ($index, $itm) {
let current = parseInt($($itm).data("star"));

$($itm).removeClass("fas");
$($itm).removeClass("far");

console.log(current);

if (current <= count) {
$($itm).addClass("fas");

console.log("fas");
}
else {
$($itm).addClass("far");

console.log("far");
}
});
});

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">

<div id="ratingModal">
<div class="body">
<div class="score-wrap">
<span class="label">Score: </span>
<div class="stars">
<i class="fas fa-star clickable star star-1" title="1" data-star="1"></i>
<i class="far fa-star clickable star star-2" title="2" data-star="2"></i>
<i class="far fa-star clickable star star-3" title="3" data-star="3"></i>
<i class="far fa-star clickable star star-4" title="4" data-star="4"></i>
<i class="far fa-star clickable star star-5" title="5" data-star="5"></i>
</div>
</div>
</div>
</div>








share|improve this answer





















  • didnt make any difference
    – TheRuler
    Nov 7 at 20:26















up vote
0
down vote













Try Using off().on('...') function






$("#ratingModal").find(".star.clickable").off().on("click", function () {
console.log("click");

var $wrap = $(this).closest(".stars");
var count = parseInt($(this).data("star"));

$.each($wrap.find(".star"), function ($index, $itm) {
let current = parseInt($($itm).data("star"));

$($itm).removeClass("fas");
$($itm).removeClass("far");

console.log(current);

if (current <= count) {
$($itm).addClass("fas");

console.log("fas");
}
else {
$($itm).addClass("far");

console.log("far");
}
});
});

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">

<div id="ratingModal">
<div class="body">
<div class="score-wrap">
<span class="label">Score: </span>
<div class="stars">
<i class="fas fa-star clickable star star-1" title="1" data-star="1"></i>
<i class="far fa-star clickable star star-2" title="2" data-star="2"></i>
<i class="far fa-star clickable star star-3" title="3" data-star="3"></i>
<i class="far fa-star clickable star star-4" title="4" data-star="4"></i>
<i class="far fa-star clickable star star-5" title="5" data-star="5"></i>
</div>
</div>
</div>
</div>








share|improve this answer





















  • didnt make any difference
    – TheRuler
    Nov 7 at 20:26













up vote
0
down vote










up vote
0
down vote









Try Using off().on('...') function






$("#ratingModal").find(".star.clickable").off().on("click", function () {
console.log("click");

var $wrap = $(this).closest(".stars");
var count = parseInt($(this).data("star"));

$.each($wrap.find(".star"), function ($index, $itm) {
let current = parseInt($($itm).data("star"));

$($itm).removeClass("fas");
$($itm).removeClass("far");

console.log(current);

if (current <= count) {
$($itm).addClass("fas");

console.log("fas");
}
else {
$($itm).addClass("far");

console.log("far");
}
});
});

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">

<div id="ratingModal">
<div class="body">
<div class="score-wrap">
<span class="label">Score: </span>
<div class="stars">
<i class="fas fa-star clickable star star-1" title="1" data-star="1"></i>
<i class="far fa-star clickable star star-2" title="2" data-star="2"></i>
<i class="far fa-star clickable star star-3" title="3" data-star="3"></i>
<i class="far fa-star clickable star star-4" title="4" data-star="4"></i>
<i class="far fa-star clickable star star-5" title="5" data-star="5"></i>
</div>
</div>
</div>
</div>








share|improve this answer












Try Using off().on('...') function






$("#ratingModal").find(".star.clickable").off().on("click", function () {
console.log("click");

var $wrap = $(this).closest(".stars");
var count = parseInt($(this).data("star"));

$.each($wrap.find(".star"), function ($index, $itm) {
let current = parseInt($($itm).data("star"));

$($itm).removeClass("fas");
$($itm).removeClass("far");

console.log(current);

if (current <= count) {
$($itm).addClass("fas");

console.log("fas");
}
else {
$($itm).addClass("far");

console.log("far");
}
});
});

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">

<div id="ratingModal">
<div class="body">
<div class="score-wrap">
<span class="label">Score: </span>
<div class="stars">
<i class="fas fa-star clickable star star-1" title="1" data-star="1"></i>
<i class="far fa-star clickable star star-2" title="2" data-star="2"></i>
<i class="far fa-star clickable star star-3" title="3" data-star="3"></i>
<i class="far fa-star clickable star star-4" title="4" data-star="4"></i>
<i class="far fa-star clickable star star-5" title="5" data-star="5"></i>
</div>
</div>
</div>
</div>








$("#ratingModal").find(".star.clickable").off().on("click", function () {
console.log("click");

var $wrap = $(this).closest(".stars");
var count = parseInt($(this).data("star"));

$.each($wrap.find(".star"), function ($index, $itm) {
let current = parseInt($($itm).data("star"));

$($itm).removeClass("fas");
$($itm).removeClass("far");

console.log(current);

if (current <= count) {
$($itm).addClass("fas");

console.log("fas");
}
else {
$($itm).addClass("far");

console.log("far");
}
});
});

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">

<div id="ratingModal">
<div class="body">
<div class="score-wrap">
<span class="label">Score: </span>
<div class="stars">
<i class="fas fa-star clickable star star-1" title="1" data-star="1"></i>
<i class="far fa-star clickable star star-2" title="2" data-star="2"></i>
<i class="far fa-star clickable star star-3" title="3" data-star="3"></i>
<i class="far fa-star clickable star star-4" title="4" data-star="4"></i>
<i class="far fa-star clickable star star-5" title="5" data-star="5"></i>
</div>
</div>
</div>
</div>





$("#ratingModal").find(".star.clickable").off().on("click", function () {
console.log("click");

var $wrap = $(this).closest(".stars");
var count = parseInt($(this).data("star"));

$.each($wrap.find(".star"), function ($index, $itm) {
let current = parseInt($($itm).data("star"));

$($itm).removeClass("fas");
$($itm).removeClass("far");

console.log(current);

if (current <= count) {
$($itm).addClass("fas");

console.log("fas");
}
else {
$($itm).addClass("far");

console.log("far");
}
});
});

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">

<div id="ratingModal">
<div class="body">
<div class="score-wrap">
<span class="label">Score: </span>
<div class="stars">
<i class="fas fa-star clickable star star-1" title="1" data-star="1"></i>
<i class="far fa-star clickable star star-2" title="2" data-star="2"></i>
<i class="far fa-star clickable star star-3" title="3" data-star="3"></i>
<i class="far fa-star clickable star star-4" title="4" data-star="4"></i>
<i class="far fa-star clickable star star-5" title="5" data-star="5"></i>
</div>
</div>
</div>
</div>






share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 7 at 18:53









Vinaysingh Khetwal

11117




11117












  • didnt make any difference
    – TheRuler
    Nov 7 at 20:26


















  • didnt make any difference
    – TheRuler
    Nov 7 at 20:26
















didnt make any difference
– TheRuler
Nov 7 at 20:26




didnt make any difference
– TheRuler
Nov 7 at 20:26


















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53194705%2fclick-event-only-fires-on-first-click-and-not-second%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







這個網誌中的熱門文章

Academy of Television Arts & Sciences

L'Équipe

1995 France bombings