Materializecss Parallax mousewheel jitters fix

Author Archives: admin

Materializecss Parallax mousewheel jitters fix

I noticed the materializecss parallax plugin was a bit jittery in chrome when using the mousewheel to scroll. I fixed the problem by adding a window mousewheel callback that aborts the default mousewheel scroll then sets the scroll amount consistently. … Continue reading

Posted in Javascript | Leave a comment

Javascript Flatten an n-dimension array iteratively and recursivley

Just in case you need to know how to flatten a multi dimensional array. Recursively, although a tad more elegant this could blow your stack up if data.length === huge.  ES6 fixes the recursion problem. var data = [ 1, … Continue reading

Posted in Uncategorized | Leave a comment

Install Laravel Spark on C9.io workspace

Hope this helps someone. After two days of toil I finally got a spark project up on a c9.io workspace here are the steps I took. This assumes you have already bought a Spark license at https://spark.laravel.com/ Create the c9 workspace. … Continue reading

Posted in Uncategorized | Leave a comment

Check if images exist before rendering with Javascript and jQuery

Recently I ran into a problem while making an events widget. Problem was, after making a bunch of Facebook Graph API requests for Facebook events some returned event objects had image urls that didn’t resolve. My fix was to check each image … Continue reading

Posted in Uncategorized | Leave a comment

Template Tag Polyfill for Internet Explorer

Have you used the HTML5 template tag? I have too. Seems like a really great idea. Then QA tests your project and you realize it won’t work in IE. Better yet, not just IE 7 or 8, all versions of … Continue reading

Posted in Uncategorized | Comments Off on Template Tag Polyfill for Internet Explorer

Print only lightbox or modal window content

This was a real kick in the Jimmy. On a recent project I had a requirement to print contents of a modal window. Solution: When the user clicks a print button add an iframe to the end of the body … Continue reading

Posted in Javascript, Uncategorized | Leave a comment

Facebook profiles vs. pages and graph api data retrieval

Help! My Facebook plugin doesn’t retrieve any data! The problem may be you are trying to retrieve data from a Facebook profile rather than a Facebook page. Facebook puts much tighter restrictions on data its Graph API makes available to … Continue reading

Posted in jQueryFacebookWall, Uncategorized | Leave a comment

Javascript return focus to parent tab

This one took me a bit. I was creating a new tab on form submission. If a user clicks a button on the new tab, focus had to be shifted back to the parent tab. If the form was submitted … Continue reading

Posted in Uncategorized | Leave a comment

JavaScript Reg-ex for sub-domain name

This one took me a bit so thought it might be worth writing it down. If you need to validate a field for a valid subdomain name, ie the “subdomain.inthedomain.com” you have a couple of requirments: 1) Field value starts … Continue reading

Posted in Javascript | Comments Off on JavaScript Reg-ex for sub-domain name

Sorry to all the fans

Ladies and gentleman all my blog posts have left the building. I used to use this thing as a way to remeber all the development stuff I couldnt remeber. I ditching that idea. Instead of  all the old unix commands, … Continue reading

Posted in jQueryFacebookWall, Uncategorized | Comments Off on Sorry to all the fans