There is a jQuery handler that, when you click on the "hide" button, collapses certain elements:
$(document).ready(function() { ... $('.hide').click(function() { ... }) ... }); I need to make it so that when the user first logs on to the site, this piece was deployed as usual, and when logged in again, it is already minimized, I try to do this through the sessions:
<?php session_start(); if(isset($_SESSION['name'])){ здесь надо выполнить действие кнопки "hide" } $_SESSION['name'] = "test"; ?> Tell me how this can be implemented? There are quite a few things in the handler of the button, can it be wrapped somehow in a function and called from php?