DOM updates not shown in 'View Source', only in 'Inspect Element'
<p>I just have write simple script which one change alts in img tag. But it is not working. Here is my script: </p>

<pre><code>jQuery(document).ready(function($) {
    var slowakluczowe = ['alt1', 'alt2', 'alt3'];
    $("img").attr("alt", function() {
        return slowakluczowe[Math.floor(Math.random() * slowakluczowe.length)];
    });
});
</code></pre>

<p>The script takes random <code>alt</code> and pins it in to image but this doesn't work well. It doesn't change the <code>alt</code> when I click 'View Source' it only works when I click 'Inspect Element'.</p>

<p>See here: <a href="http://prntscr.com/boo9jk" rel="nofollow">http://prntscr.com/boo9jk</a></p>

<p>It's working only with 'Inspect Element' How can I make it also work with 'View Source'?</p>