Use the next() method:
$('nav .dropdown-toggle').click(function(e) {
$(this).toggleClass('show');
$(this).next('.dropdown-menu').toggleClass('show');
$(this).attr('aria-expanded', function (i, attr) {
return attr == 'true' ? 'false' : 'true'
});
});