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

Popular posts from this blog

monitor web browser programmatically in Android? -

ios - iPhone/iPad different view orientations in different views , and apple approval process -

Shrink a YouTube video to responsive width -