Make this
var thisone = $(this).attr('href');
var onelinecode = $('a[href="#' + thisone + '"]');
One line?
Thanks
Make this
var thisone = $(this).attr('href');
var onelinecode = $('a[href="#' + thisone + '"]');
One line?
Thanks
You can either use attr or prop:
$("a").attr("href", "#"+ yourId);
$("a").prop("href", "#" + yourId);