Javascript

Javascript related articles and tutorials

Responsive x-tags

Custom elements are small UI components that you can re-use all over your application, while at the same time keeping you markup tidy and semantic. However, in practice, you often cannot fit the same element everywhere. Imagine the autocomplete built in the previous blog post. If you place the autocomplete in a small sidebar, you need the results appearing in a pop-over list. However, if you want to build a real search page, you want the results always visible in a clear, big area. The solution to this is a new concept, named Responsive x-tags.
Read More…

Detect size change of elements using transitions

While working on the Launchpad Portal, we needed to detect when some elements had their size changed (user had the option to change their width or height). However there is not native resize event triggered so we had to come up with another solution.

Searching around a bit, the most common way for something like this, would be setting a timeout and every few milliseconds check is the values have changed or if they are the save. However, as an experiment I came up with a more elegant way.
Read More…

Comparing jQuery Selectors

We were talking with some colleagues the other day about some best practices we should follow for one of Backbase‘s products that we are building, namely Launchpad. We were considering a way of separating selectors we use for styling and selectors we use as hooks for JavaScript (like everyone should do). And I suggested a convention I use in my personal projects, which is having an attribute: data-hook to use for selecting elements in JavaScript.

Read More…

 Scroll to top