diff --git a/app/assets/javascripts/eyecandy.js b/app/assets/javascripts/eyecandy.js index 42f74c8f..cfd47807 100644 --- a/app/assets/javascripts/eyecandy.js +++ b/app/assets/javascripts/eyecandy.js @@ -4,6 +4,7 @@ horizontal: true, vertical: true, speed: 100, // In pixels per second + color: "#00ffff", container: $(this).parent(), bumpEdge: function () {} }, options); @@ -65,11 +66,30 @@ $(document).ready( function() { + $('.eyecandy').on( "click", function() { + $(this).toggleClass("clicked"); + // $(this).marqueeify({ + // speed: Math.random()*420, + // bumpEdge: function () { + // var newColor = "hsl(" + Math.floor(Math.random()*360) + ", 100%, 50%)"; + // $('.marquee').css('background', newColor); + // $(this)[0].speed = Math.random()*420; + // } + // }); + } ); + $('.eyecandy').marqueeify({ speed: 300, + self: this, bumpEdge: function () { - var newColor = "hsl(" + Math.floor(Math.random()*360) + ", 100%, 50%)"; - $('.marquee').css('background', newColor); + // svg bgcolor + // var newColor = "hsl(" + Math.floor(Math.random()*360) + ", 100%, 50%)"; + var newColor = Math.floor(Math.random()*16777215).toString(16); + // console.log($(this)[0].self); + console.log($(this)[0].color); + console.log($(this)[0].self); + // .css("background-color", "#" + newColor); + //.css("background-color", "#00ffff"); $(this)[0].speed = Math.random()*420; } }); diff --git a/app/assets/stylesheets/application.css.sass b/app/assets/stylesheets/application.css.sass index a90bbafe..342a3dfe 100644 --- a/app/assets/stylesheets/application.css.sass +++ b/app/assets/stylesheets/application.css.sass @@ -107,6 +107,12 @@ header left: 0 position: absolute top: 0 + // background-color: hotpink + img + width: 64px + &.clicked + // box-shadow: 1px 1px 4px 4px hotpink + border-radius: 300px li