I've tried this code to hide some tables from being accessed by some groups.
Code: Select all
$mi = getMemberInfo();
// hide the table only if the user belongs to this group
if($mi['group'] == 'Pelajar') {
?>
<script>
console.log('Pelajar group detected');
$j(funtion() {
$j('#Penyelia-tile, #Pembimbing-tile, #Seliaan-tile').remove();
$j('.nav a[href^=Penyelia_view], .nav a[href^=Pembimbing_view], .nav a[href^=Seliaan_view]').remove();
})
</script>
<?php
}
Unfortunately, the tables still displayed and I got this error on console:
Uncaught SyntaxError: missing ) after argument list
What is the problem actually?
Thanks.