JavaScript Tutorials, Tips & Tricks


JavaScript is an open scripting language that enables Web authors to design interactive sites. Can interact with HTML source code and is supported by most browsers.

STOP SOPA JQuery Plugin

STOP SOPA JQuery Plugin
Right now, Internet is experiencing the biggest protest since its inception. We have seen people protesting against Companies, Government, Dictators etc. Also Internet has become their voices in form of Twitter & Facebook.But today we saw something completely new. Major websites such as Wikipedia and Google are openly demonstrating their protest against new legislation bills ...

Facebook Style Scroll Fixed Header in JQuery

While doing some UI changes of a website, we had to implement a FIX header which remains fix on top of screen while scrolling. Facebook has a similar header which remains on top of content.Now for this, there are number of jQuery plugins available out there! But in our case we weren't allowed to add any new plugins to the technology stack of application ...

Create ZIP Files in JavaScript

Create ZIP Files in JavaScript
Zip is a very useful file type if I must say most used. It is the most used file format for data compression and archiving. There are number utilities available to create/generate Zip file. Also most of the programming languages comes up with API supporting to generate Zip files. I have written a couple of articles ...

Create a Clearable TextBox with jQuery

Create a Clearable TextBox with jQuery
Recently I came across a wonderful article by David Walsh on Clearable Textboxes with Dojo Toolkit . This is a simple implementation where a clear button (x) added in a textbox which lets user to clear the content of the textbox. I have seen this simple feature in many websites and feel its very ...

jQuery: Get the Text of Element without Child Element

While writing code in jQuery, I often use .text() method to get the content of any element from DOM. This function is straight forward, it strips off all the html element from a selected element and returns the remaining text.So for below element the .text() method will return "A quick brown fox".<div id="foo"> A quick brown fox </div> <script> $("#foo").text(); ...

Dynamically shortened Text with “Show More” link using jQuery

Dynamically shortened Text with
Facebook user updates has a great functionality. If the comment text is larger than few characters, the extra words are hide and a show more link is presented to user. This way you can keep long text out of the view to user and stop the cluttering of page. Also interested users can click on more ...
Tags: , ,

jQuery Ajax – Handling unauthenticated requests via Ajax

jQuery Ajax - Handling unauthenticated requests via Ajax
Since few days I am working on a small project where I have to deal with lot of Ajax requests. The whole UI is designed such that only appropriate parts are refreshed with required information through Ajax.The application needs user authentication before accessing any part of it. Although this is easy to achieve in any MVC ...

Multiple Checkbox Select/Deselect using jQuery – Tutorial with Example

Multiple Checkbox Select/Deselect using jQuery - Tutorial with Example
Almost all the user interfaces that I have created had this functionality of selecting multiple items from a list to process them or delete them. Although its very very easy to implement this functionality in Javascript, using jQuery for this is real fun. I will show you a simple implementation of adding multiple checkbox select and ...

Understanding jQuery animate() function

jQuery animate() function is very powerful API to manipulate html elements and add animation functionality. The use of animate function is very simple. First lets check the syntax of this function..animate( properties, , , )properties: A map of CSS properties that the animation will move toward. duration: A string or number determining how long the animation ...

JavaScript Array Remove an Element

JavaScript Array Remove an Element
Following is an example of JavaScript where we will remove elements from an array with Index and Value. There are different methods in JavaScript that we can use to remove elements. We will use splice() method.Remove Array element by Index First we will see an example were we will remove array element by its index. For this we can define a generic function removeByIndex().function removeByIndex(arr, ...
Page 1 of 612345...Last »
Copyright © 2012 ViralPatel.net. All rights reserved.