Assign the element name to a variable?
<p>So this is my example HTML:</p>

<pre><code>&lt;div name="John Doe"&gt;&lt;/div&gt;
</code></pre>

<p><strong>Note</strong>: I know all about ID's and classes in CSS. I am fully aware they exist. But in this case I'm wondering what to do when it's the name value I'm trying to work with.</p>

<p>Basically, how do I save the name of the div, in this case "John Doe" to a variable?</p>

<p>I can successfully access it with the below code:</p>

<pre><code>$(document).ready(function(){
    $('div[name="John Doe"]').click(function(){

    Do something;

};
</code></pre>
