twitter bootstrap - jQuery applying style when loaded -


i learning jquery playing around basic concepts.

what trying apply style button element (id) when page loaded. here jsfiddle.

the following script , cannot spot issue it.

$(document).ready(function ({     $('#jc').css('background-color', 'red'); });  

does have jsfiddle setting or missing crucial.

your js code works if add ().

but background-color in fiddle not shown, however, css applied. change "color" instead of "background-color" , see css style applied. rather have @ css , how applied button elements.

$(document).ready(function() {    $('#jc').css('color', 'red'); }); 

Comments