خرید بک لینک
I have a 'status' div on most the pages of the home project I'm working on (trying to learn Laravel) and I wanted to be able to hide or show this bit.
The way I've done this is using a menu option with checkbox which when clicked does the appropriate bits of hiding and showing the div and adjusting the size of the other div to fill the screen. Firstly - I'm assuming this is a reasonable approach, please let me know if there is a better way.
Secondly - as expected - when I click on a link to go to another page, this option was reset and therefore it lost the last screens selection. Sooooo... I'm using
localStorage.setItem();
to store the value, which is used in the JS when I click on the check box and the value retrieved on start of the screen display to allow me to set it as it was on the last page. Again - is this solution OK/Good/Bad/Spawn of the Devil?
It's achieved what I wanted - but is it any good ? Any other suggestions would be welcome.

برچسب: نویسنده: آیلین رضوانی تاريخ: شنبه 18 شهريور 1396 ساعت: 4:26

صفحه بندی