Hi Ange Tuteur
I saw this code from topic "How to test for group membership"
https://help.forumotion.com/t140646-how-to-test-for-group-membership?highlight=check+group
but it only works in first case and last, the middle case "MOD" does not work, can you help me what is wrong here ?
I saw this code from topic "How to test for group membership"
https://help.forumotion.com/t140646-how-to-test-for-group-membership?highlight=check+group
but it only works in first case and last, the middle case "MOD" does not work, can you help me what is wrong here ?
- Code:
(function($) {
$.get('/groups', function(d) {
if ($('a[href*="/g1-"]', d)[0]) alert('ADMIN');
else if ($('a[href*="/g2-"]', d)[0]) alert('MOD');
else alert('MEMBER');
});
})(jQuery);
Last edited by TamDonCo on August 19th 2016, 9:03 pm; edited 2 times in total