[jQuery] (no subject)
[jQuery] (no subject)
<div>Ok i'm a newbie in jquery and i'm trying to write function that will replace all <span class="y"><!-- --></span> element's content with current year.</div>
<div> </div>
<div>My function looks like this:</div>
<div> </div>
<div>$(function(){
$(".y").ready(function() {
var today = new Date();
var year = today.getFullYear();
document.write(year);
});</div>
<div>});<br clear="all"></div>
<div>but when i run it - it replaces all the document with current year. In which place my mistake is ?
--
FYFI - for your fucking information </div>
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/