Getting Class or Id of element that fired an event

In jQuery we sometimes need to find class or Id of element that fires an event in a web page. This simple code below will do the job for getting Class or Id of element that fired an event in jQuery.

First of all we need jQuery so you need to add self hosted jQuery or one from available CDNs. I’m getting it from Google here.

Read More

Delete element by value from array (not by key)

While working with array in PHP sometimes we need to check if a value exists in an array and delete that key and value together from array. This simple code snippet below with explanation will help you to understand how can you delete element by value from array (not by key).

Read More

Auto increment non primary key column in phpMyAdmin

In MySQL we might need to auto increment a non primary key field or column in a database table. This might require particularly in cases where we have already set a combination of columns as primary key. So here are steps with images to let you understand how can we make a column as auto increment non primary key column in phpMyAdmin.

Read More

Uncaught SyntaxError: Unexpected token = in Chrome

While working on a project I got a JavaScript error saying Uncaught SyntaxError: Unexpected token = in Google Chrome while Firefox was performing fine. I searched on Google for similar questions but couldn’t get the issue with my code. Still later after finding solution for this Uncaught SyntaxError, I decided to post an article as below.

Read More

Setting composite primary key in phpMyAdmin

Even wonder how to set mix of two or more MySQL database columns/fields as primary key in phpMyAdmin as there is no direct link during creation of table. This articles with tell you the way to setting composite primary key in phpMyAdmin.

Read More

Textarea characters count

This article describes how can we implement textarea characters count that can also work during cut/copy and paste as well as you can also select characters upto desired length or can show reverse counting (characters remaining) in textarea. There are many tutorials online but they seem to make it more complex than it needs to be. Just a few lines of jQuery does the trick.

Read More

[ Page 3 of 16 ]