Jquery find element with variable in an xml document?
<p>Basically language return a jquery object -> which is either 'fr' or 'en', with this information I can search in a xml file which on some element have either 'fr' or 'en'    </p>

<pre><code>    var language = $('#language').attr('language'),

    title = $(queryXml).find("title[lang=" + language+ "]").text();
</code></pre>

<p>console.log(language); -> return fr</p>

<p>If I use var language = 'en', or 'fr' it works perfectly, but since I want jQuery to dynamically find the current language I used $('#language').attr('language').</p>

<p>So normally if I want to display language content, I think I should use language.[0] but it doesn't work inside a jquery function... (I just started using jquery like recently, so correct me please. I learned a lot by test) </p>
