Posts marked with "jQuery" in categories

Check If jQuery is Loaded Using typeof Operator in JavaScript

jQuery is the most used and popular library of JavaScript. If jQuery isn’t loaded, a jQuery coded site will not function properly. Such sites will reload automatically or give an error when jQuery isn’t loaded. But, how do they check if jQuery is loaded ? You will find a simple solution to accomplish this task in this post. Since, jQuery won’t be loaded, we can’t check if jQuery is loaded using jQuery.... [READ MORE]

Replace Broken Images With Default Image Using JavaScript OR jQuery OR HTML

Images are common in web pages now a days. These images make the web page attractive and beautiful. But sometimes due to problems, some images won’t load completely. When the image doesn’t load completely, that image is said to be a broken image. When the image is broken, the Browser will replace that broken image with an ugly image or replace the broken image with a blank space. I have included a broken image below.... [READ MORE]

How To Open/Show A Select Element Using jQuery

The default select elements looks ugly and if you want to create beautiful sites, its better to not use select element. But what if you really want to use select element ? The only way to accomplish this is to create a dynamic select box which functions just like the HTML select element. In this post I’m going to show you the way to create a fake select box that will open when clicked and when the user selects an option, the select box will automatically close.... [READ MORE]

How To Add Back jQuery .live() & .die() Function

As you may know, jQuery removed .live() function and instead they told to use .on() function. But I didn’t like this because .on() needs up more parameters than .live() and to handle a click function you have to add an event to the document, instead of the element. A normal live click event code is like this $("#element").live("click",function(){ dosomething(); }); When using .on() to do the same task, the code will be like this :... [READ MORE]

Executing JavaScript Code In AJAX Response

This is the first post I am creating related to the Open project. This trick is used for posting posts and making that post appear at the first of the post feed. This tutorial will guide you on how to execute JavaScript code which is in the response of AJAX call. We are going to use **jQuery **for both AJAX handling. This is the AJAX response : <script>alert("Hello Subin");</script> With a plain AJAX response, the code won’t execute.... [READ MORE]

How To Check If Internet Connection Exists In jQuery & Javascript

If you are running an app on the web that requires Internet Connection all the time, sometimes the internet connection will fail on the client side and your app won’t properly work. The best example is the New Tab Chrome Apps that will display the URL icons grayscale when offline and will make the icons back to color when online. To check whether the client’s internet connection is online, we use jQuery.... [READ MORE]

How To Add A Simple Birthday Field In A Form Using jQuery

There are certain laws on the Web. One of them is the COPPA law which clarifies the minimum age of a user to signup for a site. The minimum age is 13. If any site allows users under 13 to signup, it is considered illegal. So it’s necessary to add a birthday field in site’s Sign-Up form. So I’m going to tell you how to add a simple, stylish birthday field to your Sign-Up form.... [READ MORE]

How To Create A Simple Password Strength Checker In jQuery

A lot of new hacking methods are coming day by day. So it’s the programmers duty to make their user’s password secure. Here is a simple Password Strength Checker created using jQuery. The code contain a function got from WordPress (I modified it) which is the core component of the checker. This checker will check the following on the password : Have minimum value of 4 characters. Whether the username matches with password Whether the password contain small a-z characters and capital A-Z characters.... [READ MORE]

Create Simple Username Availability Checker Using jQuery & PHP

Many sites have signup pages. Every programmers try to make the signup pages attractive by adding stylish input CSS codes and others. Why not add a stylish username availability checker ? It’s very easy to add and will work on jQuery versions 1.2 and up. I’m also going to tell you how to check if username is available in the server side. Of course it’s PHP. The checking is SQL Injection free too.... [READ MORE]

How To Create A HTML, CSS, JS Code Editor Using jQuery

There are a lot of HTML editing services in the Web. Some of the popular services are JsFiddle and JsBin. These sites offer saving function to your account too. If you want to create a site like JSFiddle, then you are at the right place. I’m going to tell you how to create a basic HTML editing software using jQuery. The editor we’re going to create also has a live preview service which means that the user don’t have to submit the code form every time.... [READ MORE]

Follow/Subscribe

Telegram 

Mastodon  Twitter

GitHub GitLab

Subdomains

Demos  Lab

Past

This blog was once on WordPress. Now a static site. See source code on

GitLab