Case counts, as do spaces, so things that appear to the eye as equal, are not always so.
- if ($("#CFMainContentFrameset").attr("data-userrole").match(/MANAGERNOCOMP/i) )
ignores the case, and any stray spaces.
If that isn’t it. piease share a link to a demo of your page.