To add the nofollow attribute to your mega menu triggers, add the setTriggerNoFollow option to the settings in your Site Footer Code Injection area. This will prevent your mega menu trigger, but not the content, from being indexed by search engines.
<script>
window.wmMegaMenuSettings = {
layout: 'full-width', // full-width or inset
openAnimation: 'slide', // slide, fade, or swing
setTriggerNoFollow: true,
}
</script>