var target = "#live"; $(function() { $('.aw-navbar a').each(function() { $(this).attr('href', $(this).attr('href') + target); }); });