How can paste + id + in element without id?

Make this

var thisone = $(this).attr('href');
var onelinecode = $('a[href="#' + thisone + '"]');

One line?

Thanks

@bestdesign,

You can either use attr or prop:

$("a").attr("href", "#"+ yourId);

$("a").prop("href", "#" + yourId);