The tech stuff!

See the Pen SASS function and interpolation by James (@jamcgrath) on CodePen. Unitl recently I was unaware that I could call functions from within other functions in SASS and that functions can be called in string content using interpolation. In the codepen example above I have 3 functions. The first function just returns the string “Hello”. The second function calls the first funcftion, assigns the first function to a variable and then returns the variable. ... Read More
I wanted to try an experiment an email obsfucation technique on jamesmcgrath.io. The technique I decided upon was to write the email address backwards and use CSS to reverse it. I also left the href of the link empty. When it is clicked the email address to be sent to is added via javascript. The user’s email client will still open when the link is clicked. Below is the CSS,HTML and JS snippets I used. ... Read More
Once again I ended having do a little WordPress PHP. I needed to have a page display the top most parent page title if it was a child page. Otherwise it would just display the title of the current page. I decided to write a function to put in the functions.php file because I needed to put in all the page templates for the site we were working on. Without much ado, here’s the code. ... Read More
On one project that I worked on there was a lot of tables being used. Although some people cringe at the use of tables, I see no problem with them as long as they are used for what they were intended for. Which is for data not page layout. One of the problems with tables is that they are not very mobile friendly. Because of that we had to devise a solution to make them work across the different device screen sizes. ... Read More

jQuery Font Resizer
24 March 2015

See the Pen Font Resizer by James (@jamcgrath) on CodePen. On my last project I was required to make a font resizing function that enlarges or decreases the global font size. It’s pretty easy to change the font size in jQuery. You could use something like this. $('.selector').on('click', function() { $('html').css('font-size', '125%'); }); However binding the font resize to a click event only works for the current page and will be reset when the user goes to another page. ... Read More