Jquery data attributes as selectors
<p>I have input with either some given or empty "data-file":</p>

<pre><code>&lt;input type="text" value="path/to/file.gif" name="some_file" data-fileid=".selector" data-file="/path/to/file.gif"&gt;
</code></pre>

<p>The cancel:</p>

<pre><code>&lt;button class="cancel" type="button" accesskey="c"&gt;Cancel&lt;/button&gt;
</code></pre>

<p>I am manipulating the textfield to insert images which is fine, but when it comes to manipulating via data attributes, the button do not work:</p>

<pre><code>        var inputBg = $('fieldset:visible input[name*="file"]');

        var dataOld = inputBg.data('file');
        var dataSel = inputBg.data('fileid');

        $('.cancel').click(function() {
          $(inputBg).val(dataOld); // revert to old stored value if any
          $(dataSel).css('background', 'none'); // remove background from .selector
        });
</code></pre>

<p>I am using a jquery.ui.tabs, thats why I have: "fieldset:visible".<br>
But the cancel button do not work. Any idea whats missing? 
Thanks          </p>

<p>UPDATE:
Problem identified, I have to do binding to ui.tabs, but still looking for suggestions on other route, because my binding is not bullet-proof. I have to do duplication :(
I also have to change relative path to absolute path on "data-file".</p>
