JavaScript
Tutorials, tips and tricks on JavaScript.
Get the most out of the leading technology for web and application development on the client side.
Published on 5/19/2014
Last update 5/22/2014
Lazy loading applied to a web page is an excellent technique
when all contents aren't immediately visible and you want to speed up page
rendering.
A perfect candidate for this method are image galleries with many items, only
the first image is visible when the page loads, other images will be visible
only if the user decides to browse them.
This technique sounds great, but has a big SEO problem: search engine crawlers does not execute
scripts, they only analyze
HTML markup, so all the code that renders images dynamically is totally
ignored along with images and captions.
Here're four solutions and, as often happens, the best is the last one.
Read all the article...
In this article we're going to talk about content lockers,
I'll give you the know-how to create one yourself and at the end you'll have the
chance to download the JavaScript/jQuery
sources and implement it rapidly.
Content lockers were born as an annoying tool for
web marketing affiliations: in a nutshell, if you have a blog
followed by a large audience, a franchisor might pay you to partially block
contents until the reader performs an action, for example compiling a survey or
subscribing to a business newsletter. It 'a hateful practice, but generates
discete income for many bloggers.
What I propose you is a soft social media content locker, to
use with caution and wisdom.
Read all the article...
Published on 10/28/2012
Last update 3/28/2013
Social interaction of your customers are very important to analyze their impact on your conversions.
Reading the official Google Analytics developers guide, the solution seems easy but unfortunately the code doesn't work if you are correctly loading the Facebook SDK asynchronously, that's because may be the the SDK is still loading when you subscribe to the event.
Read all the article...
Have you changed your domain and don't want to loose your SEO
page rankings?
Do you have renamed a page and don't want to return errors to users that have
saved a bookmark?
You have to perform a 301 permanent redirect to the new
page/site.
There are plenty of methods to perform this, if you
Google the question you'll
be submerged by the answers.
Curiously the easiest method doesn't come out first.
Read all the article...
We've already seen in a previous article how to manage JavaScript events.
jQuery simplifies but most of all uniforms the
JavaScript events engine with 2 simple methods: bind()
for
events subscription and trigger()
to fire them.
Events are not only a prerogative of standard DOM (Document
Object Model) objects, your custom objects can throw events too, event
if they aren't DOM objects.
Read all the article...