How to use/meter Manual & M42 Lenses on all Pentax DSLRs (K-5, K-r, K-x, K-7…)


Many Pentax DSLR owners want to use M42 screwmount (Takumar) lenses, or M or K manual lenses, on their cameras because of the low cost and relatively high image quality of these lenses.

If you’re wondering whether or not these lenses can be used with Pentax DSLRs (or the K-01), then the answer is yes! Pentax as well as third-party manual and screwmount lenses can easily be mounted on any Pentax DSLR (such as the K-50, K-500, K-30, K-5 series, K-r, K-x, K-7, K10D, K100D, K200D, *ist D etc.) Just follow this guide! Continue reading

How to check if an element exists in HTML with jQuery


Recently a friend asked me how to run a function only if there is an determined element in HTML.

How can this be a common question, I decided to put on the blog.

if ( $("#element").length ) {
  // do something.

With this if() you check if an element exists on the page, and if yes (true), run a code in particular. If the if() returns false, the code inside it will be ignored.