why this jquery selecter gives me error?
<p>i am using this code ti dynamically select attributes of a element but it gives me an error in firebug</p>

<p><strong>Error:</strong></p>

<p><strong>uncaught exception: Syntax error, unrecognized expression: ''</strong> </p>

<p>Here is my code:</p>

<pre><code>jQuery('.mydata').click(function(){

    var current_id=jQuery(this).attr('id');
    var current_datatype=jQuery(this).attr('datatype');

    var next_id=parseInt(current_id);

    next_id=next_id+1;

    next_id="'#"+next_id+"'";

    var next_datatype=jQuery(next_id).attr('datatype'); //this line gives error


});
</code></pre>

<p>So please tell me a solution for it?</p>
