Monday, February 13, 2017

The Current State of Content Marketing (infographic)

Businesses know that they need to attract customers to their websites so they can sell more goods and services online. Some of the most recent data shows that consumers in the United States spend over $808 billion per year online. If your website doesn’t convert visitors into paying customers, then...

[ This is a content summary only. Visit our website http://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Irfan Ahmad via Digital Information World

New Course on Reactive Programming With RxJS

Beyond POJOs – Ten More Ways to Reduce Boilerplate with Lombok

Table of Contents Logging Annotations Lazy Getters Safer synchronized Null Checks Type Inference with val @SneakyThrows Experimental Features Extensions Methods Utility Class Constructors Flexible @Accessors Field Defaults Conclusions Comments Lombok is a great library and its main selling point is how it declutters POJO definitions. But it is not limited to that use case! In […]

Continue reading %Beyond POJOs – Ten More Ways to Reduce Boilerplate with Lombok%


by Ivan Mushketyk via SitePoint

A Comprehensive Look at jQuery DOM Traversal

Separate elements of code in hospital drips. A metaphor for DOM traversal.

[special]DOM traversal means that once you have selected an element or elements on a web page, you can move through the page elements relative to your initial selection. During this process, you can either replace the original selection with a new one or add and subtract elements from it.[/special]

In this article we will look at the available methods for jQuery DOM traversal, and see how the library provides many ways for us to easily select elements based on their relationships to other elements in the page.

Filtering Elements

Let's begin by looking at how to filter a selection down to something more specific. You can filter elements based on a lot of conditions like their position with respect to other elements and whether or not they have a specific class. Most of the time, you will end up with fewer elements selected than you began with.

Here is a list of the different filtering methods:

  • eq — This method reduces the set of matched elements to the one that is located at the index you specified. The indexing is zero based. Therefore, to select the first element, you will have to use $("selector").eq(0). Starting with version 1.4, you can provide a negative integer to begin counting elements from the end instead of the beginning.

  • first and last— The first method will return just the first element from the set of matched elements while last will return the last element from the set of matched elements. Neither of these methods accepts any arguments.

  • slice — If you are looking for all elements in a set whose index lies within a given range, you can using slice(). This method accepts two arguments. The first one specifies the starting index from which the method should start slicing and the second argument specifies the index at which the selection should end. The second argument is optional and if omitted results in the selection of all elements whose index is greater than or equal to start.

    See the Pen eq and slice methods by SitePoint (@SitePoint) on CodePen.

  • filter — This method will reduce your set of elements to those that either match the selector or pass the criteria set by you in the function that is passed to this method. Here is one example of this method with selectors:

    $("li").filter(":even").css( "font-weight", "bold" );
    
    

    You could also select the same elements using a function:

    $("li")
    .filter(function( index ) {
       return index % 2 === 0;
    })
    .css( "font-weight", "bold" );
    
    

    You can also use the function to perform more complicated selections like:

Continue reading %A Comprehensive Look at jQuery DOM Traversal%


by Baljeet Rathi via SitePoint

Web Design Weekly #267

Headlines

How much data should my Service Worker put in cache?

Nicolas Hoizey raises some really good points about how Service Workers give us a lot of power but with that power comes consequences. If you have implemented Services Workers or have it on your to do list this post is highly recommended. (nicolas-hoizey.com)

Which developers do you closely follow? (news.ycombinator.com)

Sponsor Web Design Weekly and reach over 23,400 passionate designers and developers

Articles

An Introduction to Life Cycle Events in React

React has many different life cycle methods, but in this post Tyler McGinnis explores the ones that are used most often. A great post if you are just getting into React. (tylermcginnis.com)

Maintaining Accessibility in a Responsive World

Building accessible responsive sites is hard. Thankfully the talented Scott Jehl passes on some tricks of the trade to help us achieve our desired results easier. (filamentgroup.com)

A Look into Navigation in Web Design

A retrospective on navigation patterns and an examination of where we’re heading in 2017. (cmd-t.webydo.com)

How Etsy Manages HTTPS for Custom Domains

The Etsy development team share some interesting challenges they had when building a system designed to serve HTTPS traffic for hundreds of thousands of domains. (codeascraft.com)

HTML APIs – What they are and how to design a good one

A great in depth post by Lea Verou explaining the ins and outs of HTML APIs. (smashingmagazine.com)

Optimising the Performance of Your React Application (auth0.com)

Tools / Resources

Are you a JavaScript developer looking for work?

With Hired, the job search gets turned upside down. Take your highly qualified self, create a profile and wait for companies to chase you. (hired.com)

An Almost Static Stack

How create-react-app, with a couple of modern tools, can make building static sites (with benefits) a breeze. (medium.com)

Lottie

This post is a behind the scenes look at a new open-source animation tool released by the talented Airbnb design team. If you have worked with React Native this is worth looking into. (airbnb.design)

How calc() Works

Ire Aderinokun explains how the CSS calc() function allows us to perform mathematical operations on property values. If you haven’t used calc() this is a great primer. (bitsofco.de)

CSS Exclusions: Making Boring Layouts Less Boring (webdesign.tutsplus.com)

The JavaScript Event Loop (github.com)

CMD Challenge (cmdchallenge.com)

Inspiration

Stewart Butterfield on creating Slack (soundcloud.com)

Appointment Web Forms (hackernoon.com)

One Dataset, Visualized 25 Ways (flowingdata.com)

Jobs

Product Designer at Zendesk

As a product designer at Zendesk you will collaborate with our global creative team, which spans the disciplines of product design, user research, brand and storytelling. (zendesk.com)

Frontend Developer at Contentful

As a Frontend Developer in our product success team, you’ll work on continuously shaping and reshaping the path that leads users from curiosity to happiness. (contentful.com)

Need to find passionate developers or designers? Why not advertise in the next newsletter

Last but not least…

Twitter mobile now powered by Node.js, Express and React (twitter.com)

The post Web Design Weekly #267 appeared first on Web Design Weekly.


by Jake Bresnehan via Web Design Weekly

nanogallery2 – Beautiful Image Galleries with Javascript

nanogallery2 is a javascript library to create beautiful and high-quality image galleries for your website. Easy to use for designers and coders.

It's free to use for personal or open source projects.


by via jQuery-Plugins.net RSS Feed

Achieve 60 FPS Mobile Animations with CSS3

This article was originally published on OutSystems. Thank you for supporting the partners who make SitePoint possible. Animating elements in your mobile application is easy. And animating elements in your mobile applications properly is easy, too… if you follow our tips here. While everyone uses CSS3 animations in mobile these days, many do so incorrectly. […]

Continue reading %Achieve 60 FPS Mobile Animations with CSS3%


by Jose Rosario via SitePoint