A Pen by Michael Ferry on CodePen.
This file contains hidden or 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
// scroll down page away 500px from top | |
$(window).load(function() { | |
$("html, body").animate({ scrollTop: 500 }, 1000); | |
}); |
The goal was to create a radio button-powered star rating widget that uses CSS only. I wanted each star preceding the selected one to appear selected as well.
A Pen by Marcus Burnette on CodePen.
This file contains hidden or 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 convertToSlug(Text) | |
{ | |
return Text | |
.toLowerCase() | |
.replace(/[^\w ]+/g,'') | |
.replace(/ +/g,'-') | |
; | |
} |
NewerOlder