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? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -