File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525 opacity : 0 ;
2626 margin : 0 ;
2727 }
28- .box {
28+ .check {
2929 border : 2px solid @lightbg-text ;
3030 height : 20px ;
3131 width : 20px ;
3939 // Hide native checkbox
4040 input [type= checkbox] { display : none ; }
4141
42- input [type= checkbox] ~ .box {
42+ input [type= checkbox] ~ .check {
4343 position : absolute ;
4444 top : 0px ;
4545 left : 0px ;
5050 .animation (uncheck 300ms ease-out forwards );
5151 }
5252
53- input [type= checkbox]:checked ~ .box {
53+ input [type= checkbox]:checked ~ .check {
5454 .animation (check 300ms ease-out forwards );
5555 }
5656
6363 }
6464
6565 // Style for disabled inputs
66- input [type= checkbox][disabled ]:not (:checked ) ~ .box {
66+ input [type= checkbox][disabled ]:not (:checked ) ~ .check {
6767 opacity : 0.5 ;
6868 }
6969 input [type= checkbox][disabled ] ~ .ripple {
7070 background-color : @lightbg-text ;
7171 }
7272
73-
7473 .variations (~ " input[type=checkbox]:checked ~ .ripple" , background-color , @success );
7574}
7675
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ $(function (){
55 ripples . init ( ".btn:not(.btn-link), .navbar a, .nav-tabs a, .withripple" ) ;
66
77 // Add fake-checkbox to material checkboxes
8- $ ( ".checkbox label input" ) . after ( "<span class=ripple></span><span class=check></span><span class=box></span> " ) ;
8+ $ ( ".checkbox label input" ) . after ( "<span class=ripple></span><span class=check></span>" ) ;
99
1010 // Add fake-radio to material radios
1111 $ ( ".radio label input" ) . after ( "<span class=ripple></span><span class=circle></span><span class=check></span>" ) ;
@@ -24,19 +24,6 @@ $(function (){
2424 }
2525 } ) ;
2626
27- // Material inputs engine (ripple effect)
28- /*$(document).on("mouseup", ".checkbox label, .radio label", function() {
29- console.log("click");
30- var $ripple = $(this).find(".ripple");
31-
32- $ripple.addClass("animate");
33- var timer = setTimeout(function() {
34- console.log("out");
35- clearTimeout(timer);
36- $ripple.removeClass("animate");
37- }, 800);
38- });*/
39-
4027 $ ( document ) . on ( "change" , ".form-control" , function ( ) {
4128 if ( $ ( this ) . val ( ) !== "" ) {
4229 $ ( this ) . removeClass ( "empty" ) ;
You can’t perform that action at this time.
0 commit comments