Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

How to add and remove a class on click event

hii, Today i am sharing a blog on How to add and remove a class on click event in javascript. First of all you need to either download few plugins or just copy and paste the below link inside head tag. <script src="https://ajax.google...

concat() method in JavaScript String

JavaScript String concat() method : To join one or more strings we use the concat method in JavaScript String. Syntax of concat method : string.concat(string1, string2, ..., stringX) In the above syntax you can pass any number of p...

What is the difference between .empty(), .remove() and .detach() methods in jQuery?

Hello Readers, In this blog we define the difference between .empty(), .remove() and .detach() methods in jQuery: .empty(), .remove() and .detach() all are jquery methods and all are used for removing elements from DOM but they all are diff...

How to disable jQuery animation ?

Hello Readers, We use the jquery property jQuery.fx.off or $.fx.off (globally disable all animations). By default its value is false, when we set this property to true, disables all the animation in jquery. So, instead of displaying an effect...

How do you implement animation functionality ?

Hello Readers, Jquery implement the animation functionality using jquery.animate() methods.Animate method performs animation effects on CSS properties and it's effect be on custom animation and the CSS properties should be numeric.Using this p...

Javascript Round Function

The Round function return a value towards the nearest integer. Syntax:- Math.round(number) number is any numeric expression. If the fractional portion of number is .5 or greater, the argument is rounded to the next highest integer. ...

Check the broken image link and replace it with alt text in jQuery

Check if image link is broken in page and replace it with the alt text and open the blank page when user click on it $('img').each(function( ) { $( this ).error(function(){ var img_path = $(this).attr...

How to show ads in your website using Google ad sense

Hello readers , Following are the steps to guide how you can show ads in your site. Step 1 First sign in with google ad sense account using below link https://www.google.com/adsense/start/ Step 2 After sign in with your googl...

What is the difference between eq() and get() methods in jQuery ?

Hello Readers, eq() and get() methods in jQuery: eq() method: eq() method returns the element as a jQuery object. This method constructs a new jQuery object from one element within that set and returns it that (means you can use jquer...

What is the difference between parent() and parents() methods in jQuery ?

Hello Readers, parent() : this function travels only one level in the DOM tree. parents() : this function search through the whole DOM tree. For Example : Given the following HTML : <html> <body> <di...

What is the difference between $('div') and $('

Hello Readers, $('div') : In jquery this element selects all the div element present on the page. $('< div />') : In jquery this element create the new div element and this div element is not added to DOM tree unless you dont't append...

What is the difference between jquery.size() and jquery.length ?

Hello Readers, In jquery both works and gives the same result but now the time in current version of jquery we use the jquery.length because jquery.size is depreciated. Below is the some points about this properties : jquery.size() an...

What are selectors in jQuery and how many types of selectors are there ?

Hello Readers, Jquery selectors is basically a key using with jquery library. Jquery selectors are one of the most important aspects of the jquery library. These jquery selectors are familiar with CSS and use with CSS syntax to allow page easi...

How to get the last url using Javascript

Hello Reader's! If you are stuck in a condition where you need to redirect old url. Then the quickest way to get previous url is by Javascript. By using the document.referrer function. Let's see the example below:- <script> var oldU...

How to change page background on the day time basis using Javascript

Hello Reader's! If you want to change your web background image automatic on the day time basis, i.e. for day it will show pic 1 and in night it will show pic 2 as background. Lets see the full example below:- </bo...

how to remove duplicate key values from an array using Javascript

Hello Reader's, If you have an array having the multiple duplicate key values then by using Javascript you can make them skip. Let's see the example below:- Lets say an array full of duplicate data. var axes2=[1,4,5,2,3,1,2,3,4,5,1,...

How show image on click event using Javascript

Hello Reader's If you want to show image on a click event. Then using javascript you can use this in real time. Let's see the example below:- <button onclick="add_google_logo();">Add Google Logo</button> Now the JS will go li...

How to print current date in html div using Javascript

Hello Reader's If you want to show current date in a html div, Then you can genrate it in JS then show back to html. Here is the example below:- <div id="Console"></div> Now the script will go like this:- window.onload = fu...

How to highlight a div using Javascript

Hello Reader's! If you want to make a html page that based on user activity, As user clicks on div then JS will make that div highlight. Let's say our div is - <div tabindex="0">Hello World</div> Here div with tabindex of...

How to replace multiple strings with another multiple strings

Hello Reader's! If you want to replace multiple sting with another multiple stings, then you use the JS function as below:- Lets say a given sentence having strings. var str = "I have a cat, a dog, and a goat."; //sentence to process var ...

How to get smallest key from an array using JS

Hello Reader's! if you have to get the smallest number from the array, Then you can use the JS for short calculation. And here is the example:- Lets say the array is [0] = 54.25 [1] = 536.2 [2] = 100.2 Now make a function and use th...

How to make mobile browser display either in portrait or landscape?

Hello Reader's If you want to make simple Javascript code to make mobile browser display either in portrait or landscape.. This will help you to make your required sreen <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "htt...

How to download an image automatically using Javascript

Hello Reader's! If you want to make your file download by execution of JS then you can use the code below:- var a = document.createElement('a'); a.href = "/favicon.png"; //make the link of image a.download = "favicon.png"; document.body.ap...

How to show selected words in alert box using Javascript

Hello Reader's! If you want to show what the text user has selected in a alert box, Then by using Javascript you can perform this task very quickly. Step1:- <div>Some test text for you to select</div> Make a div that show...

How to make alert message on select the radio button using Javscript

Hello Reader's! If you want to make an alert message for everytime user select the button then you can use the following JS as below:- Lets say our HTML is like this:- <input class="gender" type="radio" name="sex" value="male">Male &...

Creating service through provider and factory in angularjs.

We can create service through provider,service,value and factory. In this blog I am describing provider and factory. For value and service you can refer to my previous blog -Calculate area of a circle using .value and .service in angularjsBy crea...

What is a CDN in jquery?

Hello Readers, CDN is a content delivery network or we also call it as content distribution network, its basically a large distributed system of servers which deployed in multiple data centers across the internet. Goal of CDN: Serve co...

JavaScript string prototype property

prototype property in JavaScript: The prototype property gives us freedom to add the new property and method into the object at any time. This is the global property in JavaScript which can be called through any JavaScript object at any time. ...

Difference between body document.ready() and window.onload() function

Hello Readers, document.ready : document.ready is an specific jQuery event when the entire HTML have been loaded. window.onload : window.onload is a normal JavaScript event. The below are some point to define the difference between docum...

jQuery.noConflict in jquery

Hello Readers, jquery.noConflict is the jquery function (jquery is the client side library) when we use the jquery.noConflict function in jquery it removes the conflict between different jquery libraries like Mootools, Prototype etc. they also...

String methods charAt and charCodeAt in JS

charAt() method : This method returns the character exist in a specified index of string.The index in a string always starts with 0. Syntax of charAt() method : string.charAt(index) The index is required field. If no character is foun...

length property in JavaScript String

length property in JavaScript String : Strings in JavaScript are sequence of characters. What if you want to know the number of characters a string has, solution is call the property called length on string object. JavaScript string has the prope...

String in JavaScript

strings in JavaScript : Like other languages JavaScript also supports the string objects. String object is kind of collection of characters. We can store single character or sequence of characters in the String object. Example of defining stri...

Multi-day event spans 1 day short in FullCalendar

When we Integrate The Full Calendar in our web applications/ blog if we come accross an issue in which the multi-day event spans 1 day short. Therefore to get rid of the issue do the following steps with the start and end date as mentioned below....

Popup with Bootstrap

Welcome to Findnerd. In web development we need popup for different requirements then we start finding the third party jquery plugins which could meet our requirement. but sometimes we puzzle with these plugins. Here we are describing one other ...

Check for blank spaces in a sentence without using regex.

For this , we can use jQuery function named as split().Using split() function we can check easily that whether a input string have spaces or not. split function accepts first parameter a delimiter , second parameter is a string and split fun...

Progress bar with bootstrap

Welcome to Findnerd. Today we are going to learn the progressbar building with the help of bootstrap. We all knows the bootstrap uses different classes for different purposes so we will use the class named progress-bar, progress. Please have a l...

How can create a countdown timer using javascript?

To create a countdown timer please check the below example :- Example - In this example let's suppose a user fill a form and at that time we want to limit the form filling time to 5 minutes and at the same time we want to show that user h...

Started with Bootstrap

Welcome to Findnerd. Bootstrap is a most popular front-end framework. Frontend framework works in client side such as HTML,CSS and JS development.Bootstrap is an open source client side framework.Bootstrap is also known as Twitter Blurprint. Mar...

JavaScript createElement() Method

createElement() Method in JavaScript is used to create a HTML element dynamically. lets take an example: var select = document.getElementById("selectbox"); //1 var option = document.createElement('option'); option.text = "XYZ"; select.a...

How to upload image using simle Jquery and HTML5

Hello Reader's! If you are developing the html5 based ajax image uploader then you can look this jquery as the best and easy to use. Lets see how to upload images 1) include two JS file <script src="jslibs/jquery.js" type="text/javascri...

difference between event.preventDefault() and return false in Javascript?

In javascript , e.preventDefault() will always prevent the event from occurring which is default event. It simply means that If any method is called, then the default action of that particular event will not be triggered. Note: - We can't...

difference between call and apply in javascript?

call() and apply() are two predefined javascript methods. We use both of them to invoke a function & these method must have its own object as a first parameter. apply allow us to invoke the function with passing the arguments in the form...

Calculator Application Using Angulor JS

Here we create small application which perform 'addition', 'subtraction', 'multiplication' & 'division' with the help of Angular JS. Application Code: ng-app in div tag: it means were setting the AngularJS name. <!DOCTYPE html...

How to display different sizes of div on clicking in the drop down using angularjs?

In the below code I have created a drop down list consisting of three different sizes. On clicking a particular size it will display that size div along with its name. Here is the HTMl: <html> <head> <title>C...

How to calculate area of a circle using .value and .service in angularjs?

Services in angular is the best way to put all your business logic. Two of the ways of creating of services is- value and service. I am showing you how you can calculate area of a circle by passing any value of radius in the text box using .va...

Jquery Screen Object

screen.availHeight: This denotes the available height in the screen, i.e., the height of the users screen. Thus, if the screen resolution of the users screen is 1366 768 pixels and the height of the taskbar is 25 pixels, this property will ...

CDN in jQuery

CDN is a Content Delivery System which are deployed in multiple data centers across the internet. It's goal is to serve end users. There are 3 popular jquery CDNs: 1. Google 2. Microsoft 3. jQuery. Load jQuery from CDN: Code to load jQue...

JavaScript JSON

JSON stands for JavaScript Object Notation which is a format for storing data. JSON is used when we have to send data from server to webpage. JSON Example { "employees":[ {"firstName":"Pranav", "lastName":"Chhabra"}, {"firstNam...

Input element character limit using Jquery

Use the following codes to count the character dynamically enter by user in the input tag. HTML Code:-insert the following code in the form tag. <input type="text" maxlength="12" /> <span>0</span>/12 jQuery Code:inse...
1 20 31
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: