Last active
March 21, 2017 12:41
-
-
Save mo7amd/c49d641b1537e2e337163b76e0ec7f7f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function(){ | |
var selected = 0; | |
$('.rating__stars i').click(function(){ | |
selected = $(this).index(); | |
}); | |
$('.rating__stars i').hover( | |
function(){ | |
var index = $(this).index(); | |
for(var i=0;i<index;i++){ | |
$('.rating__stars i').eq(i).css("color","#ff9800"); | |
} | |
}, | |
function(){ | |
// selected_rate(); | |
for(var i=selected;i<5;i++){ | |
$('.rating__stars i').eq(i).css("color","#cfcfcf"); | |
} | |
} | |
); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment