WordPress file upload with AJAX

In this tutorial we will see how we can achieve wordpress file upload with ajax. The use case is that we want to have a form in frontend that will be accessed by visitors. These visitors will not be authenticated. The form will send all the form data along with the files that are uploaded, […]

Copy to clipboard using javascript without any plugin

Copy to clipboard using javascript, this is the topic that we are going to explore in this post. The solution we will discuss here will use native javascript and no third party tool. As the solution is bare minimum code snippet, it’s browser support will be limited. The way this solution for Copy to clipboard […]

Replace HTML audio tags with jPlayer

In This post we are going to take a look at how we can replace html audio tags with jPlayer. jPlayer is a popular jQuery player that provides consistent interface to play audio and video files in web page. This can be used as an alternative to default HTML5 audio and video tags in case […]

Eliminate render blocking javascript and defer parsing of js

Why is it important to Eliminate render blocking javascriptYou know your website needs to be fast. Even if the users with slow Internet connection don’t matter much to you, you should consider the speed optimization of your website because it affects your search engine rankings and these rankings obviously reflect on your site’s traffic. One […]

Make hyperlinks in ckeditor open in browser

In this post, we are going to see how we can make hyperlinks in ckeditor clickable. Normally, ckeditor prevents the hyperlinks to open in the edit mode to enable proper formatting. But, sometimes, users may want the links to open in browser. This can be accomplished by following snippet How to make hyperlinks in ckeditor […]

Preview an image before uploding using javascript

While creating html forms, most of us include an input field for uploading files. If the type of file to be uploaded is image, it would be great to allow the site user to preview the image before actual upload. This can be achieved by using javascript’s File reader.   Html markup And the corresponding […]

Dynamically make DOM element height equal

Most of the time we encounter a situation where our layout is disturbed due to uneven heights of the divs, spans or other elements having varying amount of content. This causes them to have variable height which in turn results in broken layout. A quick and simple fix for such problem can be adjusting the […]