You need to use:
$('.inner').on('click', function (e) {
e.stopPropagation();
})
$('.outer').on('click', function (e) {
$('.inner').toggleClass('hidden');
})
since e.stopPropagation() prevent event buble up not down the DOM tree