WordPress Theme Development Cheat Sheet

WordPress Theme Development Cheat Sheet

Below are some snippets I use in just about every custom WordPress theme, I posted theme on here for personal reference and hopefully to help some new developers out. The code below can be put in your theme’s function.php  file.

(more...)

No Comments Yet  |  Posted in: Wordpress ,

offsetX/Y in Firefox

offsetX/Y in Firefox

Just a gentle reminder that Mozilla Firefox doesn’t seem to support the offsetX and offsetY values for mouse events. If you find yourself wanting that value in Firefox, a suitable replacement is to subtract the targeted element’s offsetTop/Left from pageX/Y, which will give you the same value as offsetX/Y would give you.

Here is an easy function for jQuery users, which will add offsetX/Y to your existing event variable.

(more...)

No Comments Yet  |  Posted in: Web Development , , ,