hide page 1

hello
What is wrong with the code does not hide it
use 2020
// Page Render event
function Page_Render() {
//echo “Page Render”;
if ((CurrentUserLevel() == 3)) {
$(“[href=‘#tab_page2’]”).hide();
} else if ((CurrentUserLevel() == 2)) {$(“[href=‘#tab_page2’]”).show();
}
}

I used this code and it did not work
please help// Write your table-specific startup script here
// console.log(“page loaded”);

<?php if (CurrentUserLevel() == 3) { ?>

$(“li:contains(‘Page 1’)”).hide();

<?php } ?>

This code works
I want to add a condition to it : f (CurrentUserLevel() == 3)
Please help add a condition
If not CurrentUserLevel =3 is displayed to everyone// Write your table-specific startup script here
// console.log(“page loaded”);$(“[data-table=‘visit_teacher’]”).hide();

I want to hide the table :visit_teacher
I used this code and failed to hide it : CurrentUserLevel =3
see CurrentUserLevel =2// Write your table-specific startup script here
// console.log(“page loaded”);
//$(“[data-table=‘visit_teacher’]”).hide();$(document).ready(function(){
$(“[data-table=‘visit_teacher’]”).hide();
{
if (CurrentUserLevel() == 2)$(“[data-table=‘visit_teacher’]”).show();} else {
$(“[data-table=‘visit_teacher’]”).show();}});

You may output client side conditionally by server side code, e.g.<?php if (...) { ?>// client side code<?php } ?>

Thank you so much
The code succeeded, thanks to you

<?php if (CurrentUserLevel() == 3) { ?>$('[data-table="visit_teacher"]').hide();<?php } ?>