Javascript - Simple Jquery Set CSS Issue -
why won't set css .btn-post element. i've tried putting in function well.
var variable = "hsla(359, 61%, 30%, 1);" $('.btn-post').css('background', variable );
may need doc ready
handler it:
$(function(){ var variable = "hsla(359, 61%, 30%, 1)"; $('.btn-post').css('background', variable ); });
Comments
Post a Comment