Triggered Ability: An ability that has a prerequisite that must be met or paid before it is used.
A triggered ability is a type of ability that has some kind of timing or cost related prerequisite gating its use. Once a triggered ability is triggered, it must immediately resolve, pending any timing priority issues. There are two types of triggered abilities: paid abilities and conditional abilities.
In order to use a triggered ability a prerequisite must be met. This prerequisite is either a trigger cost that must be paid (paid ability) or a trigger condition that must be met (conditional ability). Once an ability is triggered, its effect is resolved immediately and can only be stopped by prevent or avoid effects. Players must follow all restrictions on the cards when triggering abilities.
If the Runner gains a click with Joshua B. and then trashes the card using Aesop's Pawnshop, would he still take a tag at the end of the turn, considering Joshua B. is no longer active?
Yes. The Runner would still take the tag, even though Joshua B. is no longer active, because "If you do...." is part of the same ability. Once an ability is triggered, it remains active and resolves unless prevented or avoided.