per esempio ho creato il seguente file:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="generator" content="CoffeeCup HTML Editor (www.coffeecup.com)">
<meta name="created" content="dom, 27 set 2015 16:57:57 GMT">
<meta name="description" content="">
<meta name="keywords" content="">
<title>esempioJQuery</title>
<styletype="text/css">
<!--
body {
color:#000000;
background-color:#FFFFFF;
}
a { color:#0000FF; }
a:visited { color:#800080; }
a:hover { color:#008000; }
a:active { color:#FF0000; }
#colore{background-color: white; }
-->
</style>
<!--[if IE]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<input type="text" id="colore">
<script>
$(document).ready(function(){
$('#colore').css('background-color','#666');
alert("ciao");
});
</script>
</body>
</html>
Voglio cioè cambiare lo sfondo all'elemento input colorandolo di grigio......ma non succede nulla ....perché?