Simplified jquery for easier understanding.