Youtube Auto Loop a Video

Looping a Youtube Video

I was working on adding a few features to a pet project – one of them was allowing users to add a youtube video to their profile page. In order to this though, we need to get familiarized with youtube and a few parameters we already know.

A commonly known parameter is autoplay, if we set this to “1” – the youtube video will play automatically on an initial page load.

The general structure is illustrated below, get familiar if you aren’t already – this is a pretty cool feature.

Continue reading “Youtube Auto Loop a Video”

Using jQuery to automatically download a PDF file

Window Location Href in Javascript

I’ve been working through one of those client requests that isn’t use too often. They wanted a PDF be automatically downloaded after submitting their email (the only field on the form).

I started thinking about different scenarios, particularly this one:

If a visitor successfully completes the form and hits submit, should the PDF open on a new window tab or should it be automatically be downloaded?

Continue reading “Using jQuery to automatically download a PDF file”

Big Commerce – Adding rel attributes to pagination

BigCommerce Adding Rel Attributes to Pagination

I was working on a BigCommerce site that needed rel attributes added to its pagination links. I’ve worked with BigCommerce sites in the past and I was curious if their backend had changed since then.

The rel=”next” and rel=”prev” link attributes are used to tell Google that each page in the series are unique – this eliminates duplicate content. This is similar to the rel=”canonical” attribute.

I dove right in – everything looked pretty much the same which was good, I needed that extra time to get familiarized again with where their template files were. I’m a big fan of BigCommerce – their backend is super slick. They’re working hard over there at BigCommerce.

Continue reading “Big Commerce – Adding rel attributes to pagination”

WordPress links with hashes and disabling a links normal behavior

WordPress allows for the creation of custom links within the Menu’s area. I like this feature, it has been around for years.

I use it sometimes to create internal and external links but there are cases where I wanted them disabled. In this case and as you may have experienced – a custom link requires a value. It’s pretty common to just put a hash “#” as a value.

Something like href=”#”. This however will cause the element to behave normally as it should – there’s nothing wrong with that except it will cause your page to “jump” back up to the top of the page which can be annoying for visitors.

Continue reading “WordPress links with hashes and disabling a links normal behavior”