How do you handle with control binding in jquery
<p>I have a question about jquery and DOM manipulation. How do you handle with DOM controls for e.g.</p>

<p>I have to get value from text input so I could this in ways:</p>

<pre><code>var SomeClass = function() {
    var control;

    this.setControl = function(c) {
        control = c;
    }

    this.getValue = function() {
        return control.val();
    }
}

$(document).ready(function() {
    var sc = new SomeClass(); // of course control could be passed in contructor as well
    sc.setControl($('#CONTROL'));
    console.log(sc.getValue());
});
</code></pre>

<p><strong>OR</strong></p>

<pre><code>var SomeClass = function() {
    var control = $('#CONTROL');

    this.getValue = function() {
        return control.val();
    }
}

$(document).ready(function() {
    var sc = new SomeClass();
    console.log(sc.getValue());
});
</code></pre>

<p>what is your opinion? What is better or maybe this is pile of trash therefore what is the best solution. Plz dont send me to backbone, spine and so on Im interesed in only in jquery.</p>

<p>best!</p>

<p>EDIT:</p>

<p>do you separate logic from UI or you are mixing it? 
more complicated example</p>

<p>in js file you have a class that uses text control and in the secound js file also you need values from this input. What you are doing? you just call everytime $('#control') or create a third js file where would be a separated "class" to manipulate this input? </p>
