50 Plugins for Alerts and Notifications

javascript alerts and notifications

Today I want to cover the top jQuery plugins for alerts and messages, and the best JavaScript notification libraries. I usually start development using alert() and console log messages but soon I have to convert these messages to a nice JS notification system. Looking around, I quickly realized that there are many options: you have plain JS solutions, jQuery alert plugins, BootStrap versions, alert modules for Angular, BackBone alert systems, and other notification frameworks for ReactJS, Meteor, UI Kits, etc. Here are the top 50 alerts and notification libraries with a some organization:
Read more

Resize and Drag Elements with JavaScript

resize element with javascript

Dragging or resizing elements or divs on the screen is a pretty popular feature of modern user interfaces. It’s pretty awesome that there is a resize property in CSS3 and drag and drop in HTML5. However, both are pretty limited, and modern designs for such functions require JavaScript solutions. Many end up implementing Resizable and Draggable from jQuery UI (example) but that library is really bloated and today I will cover some jQuery UI alternatives to resizing and dragging elements on the page.
Read more

WordPress Upload Files with Ajax

WP upload file with ajax

How do you upload files to WordPress with Ajax? Maybe you want fileupload functionality on the front end or enable file uploads in your WordPress plugin. There are a lot of good tutorials on this subject but I couldn’t find any simple example that works with native WP files.

This tutorial on multiple file uploads on the front-end does work but it requires using a server side file for the back end and custom functions in functions.php that use media_handle_upload without Ajax. Tutorials on WordPress file uploads with ajax leverage special jQuery plugins, queuing wordpress scripts, and server side functions to process the Ajax request. This might be needed if you need a lot of control but if you just need to easily upload and delete files, I will show you how to do it in a few lines of simple vanilla JavaScript.
Read more

Awesome JS10K HTML5 Games

best html5 games

It’s 2015 and I wanted to follow up to an older post on HTML5 games with a new listing of some amazing, simple, and addictive games written in JavaScript, CSS, and HTML. I have been a fan of 10K Apart and the contest has a lot of great games that have been developed in very little code. This often includes all kinds of compression, minification, and even using JavaScript code inside of images to reduce the total size of the project. Its amazing how much you can create in just 10k of code. Here are my favorite 35 HTML5 games from this contest:
Read more

Best Mobile Frameworks and Platforms for Hybrid HTML5 Apps

mobile frameworks for building html5 apps

A while ago, I got into mobile app development using HTML5 and PhoneGap. It was a great solution to create apps for iOS and Android while coding in HTML, CSS, and JavaScript. Today, we have a lot more options in this space. There are many frameworks for building mobile applications and there are also multiple platforms that package that code into a deployable apps and even provide things like monetization, analytics, and testing. Today, I will analyze the mobile development space and go over the best mobile frameworks and cross-device platforms to build and deploy hybrid mobile applications.
Read more

Create Repositories with GitHub API and HTML5

Create repo with GitHub API

Create GitHub Repo with Folder Upload

GitHub has a ton of awesome repositories and it hosts most of the top libraries, frameworks, and plugins. People sometimes ask me to put code on GitHub and today I wanted to look into optimizing that process. It’s not hard to create a git repo, pull it, authenticate, and commit from the command line but it would be great to just have it all work with just a folder upload. If you are working on a project, it probably lives in a folder on your hard drive, so lets create a page where you can upload folders and it automatically creates a repository using the GitHub API.

First, I will pick up from my last post on the Gist API and explain how you can create and add files to GitHub repos with Ajax. Then, I will create an online page that supports repo creation with client-side folder input and API calls with Ajax.
Read more

NodeJS on Google App Engine

Nodejs on Google App Engine

Are you looking for free hosting for your node projects? You could try DigitalOcean but GAE Managed VMs are now in Beta (you can use them without whitelisting) so I wanted to dedicate a quick post on running Node on Google App Engine. It could be a free and easy way to host your node.JS app. Since we are not coding in Java, Python, or Go Lang, we need to setup a custom runtime environment on a Virtual Machine. So, below I will go over installing Managed VMs with Google Cloud SDK and Docker to build and deploy a sample app, written in Node and Express, to Google App Engine.
Read more

Automate SlideShare Creation with JavaScript and APIs

programmatic automation

I am a big fan of SlideShare and automation so today I want to show how you can programatically create a slideshow with JavaScript and upload it to your account with the SlideShare API. I am going to use jsPDF to generate a PDF file from images and text. When the pdf is created, I will use the upload_slideshow API call to upload the pdf into awesome slides on SlideShare. And the slides will be the actual steps to do this. Let’s start.
Read more

Unminify HTML, CSS, and JS Code with JavaScript

Beautify and Unminify Code

Online Tool to Unminify HTML, CSS, and JS

There are a few reasons to minify code, the major one being web performance. Browsers don’t need whitespace and comments to process your files. But, it’s not fun to work obfuscated code and I find myself often using jsbeautifier to uncompress source code. Today, I decided to implement this tool myself show how you can unminify and reformat HTML, CSS, and JS code with a JavaScript function. Since js-beautify is open source and supports JavaScript, this was an easy task.
Read more

Save File with Ajax and PHP

Today, I am going to go over a simple example of saving content from a web page to your server. Imagine a textarea with a save button, which grabs the text from the user input and sends it to your server. There PHP grabs the data and writes it into a unique file. Our php script will respond to the Ajax request with the file name in a link so that the end user can retrieve it directly through another web request.
Read more