how to set a value for a span using JQuery
<p>How to set a value for a span  using JQuery..</p>

<p>For example…
Below is my span</p>

<pre><code>&lt;span id="submittername"&gt;&lt;/span&gt;
</code></pre>

<p>in  my JQuery code…</p>

<pre><code> &lt;script type="text/javascript"&gt;
jQuery.noConflict();

jQuery(document).ready(function($){

    var invitee = $.ajax({
        type: "GET",
        url: "http://localhost/FormBuilder/index.php/reports/getInvitee/&lt;?=$submitterid;?&gt;",
        async: false
    }).responseText;

    var invitee_email=eval('(' + invitee + ')');
    var submitter_name=$.map(invitee_email.invites, function(j){ 
        return j.submitter;
    });         
    alert(submitter_name); // alerts correctly 
    $("#submittername").text(submitter_name); //but here it is not working  WHy so??????
});
</code></pre>

<p></p>
