Sometimes you want an action to happen only when the user clicks. For instance, I had a rollover effect going trigger the same action as a click on filter button. However, if the button is clicked I wanted to avoid rollover to change the selected filter to keep the selected filter active. So if the user clicks, I run the trigger, if not I don’t run it.
Adding CSS loader is important for the user experience, making the feel of your webpage more smooth during the page load or some specific elements such as bigger assets loading. Here is a list of resource of nice CSS and HTML loaders. Continue reading “Pure CSS loader and spinner resource list”
Quick one about fancybox. if you import the library and get an error type env(safe-area-inset-right)” is not a number for `max’. Here is a quick fix
Quick one about splitting a variable in two from last chosen character. I use it from a name string with first name(s) and surname.
In my case, I wanted to get the last element on a new line to follow the design. Continue reading “jQuery split string at the last space in variable”
The autoplay policy changed in April 2018 for Chrome.
Autoplay is currently restricted in the following environments: Continue reading “HTML5 video autoplay for Chrome policy”