My jquery code is working in google chrome console not after saving it?
<p>i have to select and deselect images and Jquery my code is working fine in Google developer console but not after i save it in my file.</p>

<p>This work in chrome developer console not when i have it in my code</p>

<p><a href="http://i.stack.imgur.com/vhtet.png" rel="nofollow">image</a></p>

<p>This was the last question which i asked it is related to this<a href="http://stackoverflow.com/questions/11648786/toggle-between-borders-of-a-image-and-remove-borders-of-other-existing-images/11649003#comment15462371_11649003">Reference</a> </p>

<p><strong>mycode</strong></p>

<pre><code>    $(document).ready(function() {
        var selectpic;
        $('img').click(function () {
             $('img.highlight').not(this).removeClass('highlight');
             $(this).toggleClass('highlight');
             selectpic = $(this).attr('src');
            });
        });
</code></pre>

<p>This is actually inside a popup div.</p>

<p><strong>main</strong> window which calls the above popup</p>

<pre><code>    function showImageUploadDialog(event) {
    $(".ui-widget-overlay").show();
    cdDiv();
    $('#gallery').hide();
    $('#upload_popup').dialog({
        height : 'auto',
        width : '848px',
        modal : 'true',
        top : '58px',
        left : '559px',
        resizable : 'false',
        dialogClass : 'pop_up'
    });
    $(".ui-dialog-titlebar").hide();

}
</code></pre>

<p>I think it should be made global,And  I don't know how to make it.</p>
