I have looked at several questions but I can't seem to make the .css() work with the variables and gradient I want. You should be able to drop two colors into the inputs and BANG it gives you a gradient but no dice. Any suggestions?
Below is my JQ:
$(document).ready(function () {
var colorTop = $("#color1").keyup(function () {
var color1 = $("#color1").val();
$("#demo").css("background", color1);
});
var colorBottom = $("#color2").keyup(function () {
var color2 = $("#color2").val();
$("#demo").css("background", color2);
});
function changeGradient(colorTop, colorBottom) {
$("#demo").css({
background: 'linear-gradient(' + colorTop + ', ' + colorBottom + ')'
});
};
});