by Rob Hope via One Page Love
"Mr Branding" is a blog based on RSS for everything related to website branding and website design, it collects its posts from many sites in order to facilitate the updating to the latest technology.
To suggest any source, please contact me: Taha.baba@consultant.com
Thursday, October 20, 2016
EverythingInBetween
by Rob Hope via One Page Love
SMFolio
by Rob Hope via One Page Love
AtoZ CSS Quick Tip: Benefits of rem and em Values
R is for rem
and em
In the original screencast video we learned all about the :required
pseudo class which is useful for styling forms with fields that must be filled in.
As much as forms, validation and styling state are big topics there isn't too much we didn't cover on the topic of :required
the first time around. So instead, let's look at a couple of quick tips for using the rem
unit of measurement. But first, let's look at another type of relative unit: the em
.
The Pros and Cons of using em
When working in a responsive project it's more flexible to use relative units like em
for sizing text and spacing in and around elements rather than pixels. This is because this unit is relative to the font size of its parent element, allowing an element's size, spacing and text content to grow proportionally as the font-size
of parent elements change.
Using these relative units enables you to build a system of proportions where changing values of font-size
on one element has a cascading effect on the child elements within. A system of proportions is a good thing, but this behavior of em
does come with a downside.
Continue reading %AtoZ CSS Quick Tip: Benefits of rem and em Values%
by Guy Routledge via SitePoint
Quick Tip: Replace jQuery’s Ready() with Plain JavaScript
The ready
method was implemented in jQuery to execute code when the DOM is fully loaded. Since it executes the given function when all DOM elements are available, you can be sure that trying to access or manipulate elements will work.
Before jQuery 3.0, the typical usage with a anonymous function looked like this:
$(document).ready(function() {
// Handler for .ready() called.
});
jQuery 3.0 ready() Changes
Before the release of version 3, there were several ways you could call the ready
method:
- on the document element:
$(document).ready(handler);
- on an empty element:
$().ready(handler);
- or directly (i.e. not on a specific element):
$(handler);
All above named variants are functionally equivalent. The specified handler will be called when the DOM is fully loaded, no matter on which element it was called. In other words, calling it on an image element $("img")
versus the document element doesn't indicate that the callback is fired when the specified element is loaded. Instead, it will be called when the entire DOM is fully loaded.
In jQuery 3.0, all other syntax methods except $(handler);
are deprecated. The official justification is:
This is because the selection has no bearing on the behavior of the
.ready()
method, which is inefficient and can lead to incorrect assumptions about the method's behavior.
Difference Between the Ready and Load Events
The ready
event is fired when the DOM is fully loaded and accesses to elements are safe. The load
event, on the other hand, is fired after the DOM and all assets have loaded.
The load event can be used as follows:
Continue reading %Quick Tip: Replace jQuery’s Ready() with Plain JavaScript%
by Julian Motz via SitePoint
11 Ways to Grow Your Snapchat Following
Is your business on Snapchat? Looking for ways to attract new followers? One of Snapchat’s biggest challenges is its limited features for getting discovered by other users. In this article, you’ll discover 11 simple ways to grow your audience on Snapchat. #1: Connect via Your Address Book The easiest way to find Snapchat users to follow [...]
This post 11 Ways to Grow Your Snapchat Following first appeared on .
- Your Guide to the Social Media Jungle
by Carlos Gil via
Driver
by via Awwwards - Sites of the day