Search

Nalezeno "JavaScript": 799

Stacked Cards with Sticky Positioning and a Dash of Sass


The other day, I spotted this particularly lovely bit from Corey Ginnivan’s website where a collection of cards stack on top of one another as you scroll. I started wondering how much JavaScript this would involve and how you’d go about making it when I realized — ah! — this must be the work...

Practical Use Cases for JavaScript’s closest() Method


Have you ever had the problem of finding the parent of a DOM node in JavaScript, but aren’t sure how many levels you have to traverse up to get to it? Let’s look at this HTML for instance: <div data-id="123"<buttonClick me</button</div That’s pretty straightforward, right? Say...

PSF Token Invokes the First Coin-Age Staking Protocol on Bitcoin Cash


During the last six months, the Simple Ledger Protocol has grown immensely and there’s been 9,604 SLP tokens created since the infrastructure launched. Just recently news.Bitcoin.com reported on mistcoin, the mineable SLP token that can be mined with a CPU. Now software developer Chris...

Nailing the Perfect Contrast Between Light Text and a Background Image


Have you ever come across a site where light text is sitting on a light background image? If you have, you’ll know how difficult that is to read. A popular way to avoid that is to use a transparent overlay. But this leads to an important question: Just how transparent should that overlay...

JavaScript Fatigue


From Nicholas Zakas’ newsletter, on how he avoids JavaScript fatigue:  I don’t try to learn about every new thing that comes out. There’s a limited number of hours in the day and a limited amount of energy you can devote to any topic, so I choose not to learn about anything...

TypeScript, Minus TypeScript


Unless you’ve been hiding under a rock the last several years (and let’s face it, hiding under a rock sometimes feels like the right thing to do), you’ve probably heard of and likely used TypeScript. TypeScript is a syntactical superset of JavaScript that adds — as its name suggests — typing to...

Match Accented Letters with Regular Expressions


Regular expressions are used for a variety of tasks but the one I see most often is input validation. Names, dates, numbers…we tend to use regular expressions for everything, even when we probably shouldn’t. The most common syntax for checking alphabetic characters is A-z but what...

Expanding the Future (of Dev Tooling) with AI


Codota wants their tools to (at least!) double developer productivity. My vision is that we can do that not only by getting more developers using these tools, but in expanding where and how these tools learn themselves. The better the tools can *learn from us* what we're doing, the better *we...

Promise.allSettled


The Promise object has many useful functions like all, resolve, reject, and race — stuff we use all the time. One function that many don’t know about is Promise.allSettled, a function that fires when all promises in an array are settled, regardless of whether any of the promises...

A Lightweight Masonry Solution


Back in May, I learned about Firefox adding masonry to CSS grid. Masonry layouts are something I’ve been wanting to do on my own from scratch for a very long time, but have never known where to start. So, naturally, I checked the demo and then I had a lightbulb moment when I understood...

Collective #615


Primo * What the f*** is ...? * 3D Book Image CSS Generator * Event Delegation in JavaScript * CSS easing The post Collective #615 appeared first on Codrops

Vue 3.0 has entered Release Candidate stage!


Vue is in the process of a complete overhaul that rebuilds the popular JavaScript framework from the ground up. This has been going on the last couple of years and, at long last, the API and implementation of Vue 3 core are now stabilize. This is exciting for a number of reasons: Vue 3 promises...

What ya need there is a bit of templating


I had a fella write in to me the other day. He had some HTML, CSS, and JavaScript, and it just wasn’t behaving like he thought it ought to. The HTML had some placeholders in it and the JavaScript had some data in it, and the assumption was that the data would fill the placeholders. To those...

How to Make a Monthly Calendar With Real Data


Have you ever seen a calendar on a webpage and thought, how the heck did they did that? For something like that, it might be natural to reach for a plugin, or even an embedded Google Calendar, but it’s actually a lot more straightforward to make one than you might think and only requires...

Binding Arguments with Bind


One of my favorite and most essential Function method is bind, a function we added to MooTools when it wasn’t featured in the JavaScript language itself. We often think of using bind to simply bind a method’s call to its host object, but did you know you can also bind arguments with...

Creating a Gatsby Site with WordPress Data


In my previous article last week, I mentioned creating a partially ported WordPress-Gatsby site. This article is a continuation with a step-by-step walkthrough under the hood. Gatsby, a React-based framework for static sites, is attracting attention not only from JavaScript developers but also from...

Netlify Does Cache Invalidation For You


This is one of my favorite Netlify features. Say you’re working on a site and you change as asset like a CSS, JavaScript, or image file. Ya know, like do our job. On Netlify, you don’t have to think about how that’s going to play out with deployment, browsers, and cache. Netlify...

Three CSS Alternatives to JavaScript Navigation


Hey quick! You’ve gotta create the navigation for the site and you start working on the mobile behavior. What pattern do you choose? If you’re like most folks, it’s probably the “hamburger” menu that, when clicked, uses a little JavaScript to expand a vertical list of navigation links. But that’s...

Lazy Load IFRAMEs


We’ve known for a decade that lazy loading resources like JavaScript, CSS, and especially images is a massive performance win for web pages. At first we used tricks and JavaScript to do the lazy loading, but more recently native image lazy loading has debuted in browsers. Did you know that...

Nahoru
Tento web používá k poskytování služeb a analýze návštěvnosti soubory cookie. Používáním tohoto webu s tímto souhlasíte. Další informace