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

Getting all element values using jQuery

Many times we face the problem of getting all the form controls or elements values of a long form. Because sometime getting so many controls by their id or name is very typical that make a long list.
So we need to opt a short way for getting all element values using jQuery. I have described three ways in this article.

Read More

Getting Checkbox Values in jQuery

Many times we use checkbox in the form control and post the form using jquery ajax and then we are required to access those form data from client side scripts, like Javascript. Among all possible form control, dropdown box, checkbox and radio buttons are having multiple options to select. So, we need to push all selected values of these form controls into an array using Javascript

Read More

Live text search using jQuery

Someday before I faced a question of live text search using jQuery means how to search a text with in a DOM element using jQuery. Live search using jquery script can be integrated easily on any page where you are listing products, user profiles, news, blog posts and any ordered or unordered lists etc.

Read More

Full sized image with Fancybox

I was using Fancybox in one of my websites for showing images in popup. Everybody use Fancyboxto show data in popup with responsive way but here I had a different requirement of showing full sized image with Fancybox.

So same I am sharing here the solution of showing full sized image with Fancybox

Read More

Google Adwords Conversion with AJAX

I had a Google Adwords Conversion tracking code that I needed to implement basically on an onclick event. The form I am tracking, submits information using AJAX and then renders a ‘Thank you’ message to the page by replacing the form’s div with the ‘Thank you’ HTML.

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

PHP Captcha using jQuery AJAX

Generally We use Captcha in the form to ensure that the form is submitted with manual intervention without any tools or programs. In this article we will show captcha using jQuery from PHP. Using jQuery we can also refresh the captcha code by resending AJAX call to generate new captcha image.

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 2 of 9 ]