Tag : javascript

I am using Swiper.js to make a carousel that makes use of the renderBullet function provided by Swiper. My current script works great for one instance, the issue I have is that if I want to have multiple instances of this swiper my current code will get confused with the forEach array I am using to pass through the data attributes in order to display the correct pagination hyper..

Read more

I’m writing codes to find a proper target and make subsequent operation on it. My current codes would first try to look for Type 1. If it doesn’t exist, I’ll try to look for Type 2 and so on. Because the find function costs CPU too much, I’d like to avoid using it to find all Types at the beginning. The following are my current codes. How can I simplify..

Read more