Home >Web Front-end >JS Tutorial >Beginner's Jquery plug-in production: the function of hiding some rows in the query screen of SageCRM_jquery
Solution:
1. Add a [—][ ] sign in the title for users to click.
2. The user's behavior of shrinking and expanding the screen is stored in Cookie. Even if the page is reloaded or the user logs back into the system, the user's behavior can still be remembered.
Advantages: 1. It is done in the form of Jquery plug-in, which is easy to expand. Easy to implement.
2. The behavior saved in Cookie is easy to implement, reduces the workload, and can be accepted by users. If saved in the database, the page load will be increased.
Disadvantages: You cannot use separate behaviors for each page, that is: every user's contraction and expansion are global in the system. And after logging in to another computer or clearing the cache, the user's operations cannot be remembered.
First implement it using js function. Then change to Jquery plug-in: code
The effect is as shown below:
Shrink:
Expand:
PS: SageCRM only supports IE7 and IE8. So the plugin here does not test browser compatibility.