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

Featured

What is the difference between JavaScript and JQuery?

Hii all, it seems that many want to know what is actually a difference between JavaScript and JQuery. So, here are following differences between these two :- JavaScript :- 1. JavaScript is a scripting language. 2. In JavaScript, you...

Active Inactive button in cakephp using ajax

Suppose we have a table name player and in player table we have field like id , image,player_name, status,  etc. Suppose data inside fields are id=1, name=ram, image=abcd.jpg and status=0, Now we want to change status to 1, and again we have...

Difference between Graphics tags Canvas and svg tags

HTML5 has tags for graphics like: 1. Canvas 2. SVG There are certain differences between the two: 1. SVG is resolution independent while canvas is resolution dependent. 2. SVG supports event handlers while canvas doesnot support event hand...

Adding/Removing input fields on button click

In this blog, we are adding input field by clicking on more button and removing input field by clicking on erase button. The procedure of doing this is very simple and easy. I have provided the code for doing this below . In below co...

Disable browser back button using JavaScript

Hello Readers! Here is a small blog on how to disable the browser back button. Although it is not advisable to use such tricks in websites as restricting or disabling the browser back button can be annoying for users who might wish to go back to ...

Object Literals In Javascript

Like in many other programming languages, there are objects in JavaScript.The objects in JavaScript can be compared to object in real life. JavaScript object's is a standalone entity, with its own properties and type . Compare it with a bucket, ...

How to make price range UI using Jquery

Hello Reader if you wan to make range selector UI using jquery this blog will be helpfull to you. Lets start making this UI. First you have to create html file and it's code will go like this:- <!doctype html> <html lang="en"> ...

How to generate date selector using in website

Hello Reader's if want to generate the date selector then you can use the Javascript. By choosing JS you don't have to write every month, day or date hard core in the code. Lets start to generate the code for it. Step 1: Create head section ...

SetTimeout Function

SetTimeout function is used when you want to execute the code after specific number of milliseconds, Syntax: - setTimeout(function() { $(".thememessage").html('Code Executed after three second'); ...

Geolocation API in HTML5

HTML5 Provides new feature of geolocation API which can help user to find his current location and share the location to the web site. It works with the javascript which capture the latitude and longitude of the user. It works with the global ...

Sorting an array of JavaScript objects

Hello friend, I have a javascipt array object. Now i will try to sort price in this array. For Example: var data = [ { "h_id": "3", "city": "Dallas", "state": "TX", "zip": "75201", "price"...

How to pass a variable from php to javascript

Hello reader! There are mane ways to pass a variable from one technology to another technology but if you do want to use PHP, always encode with json_encode before outputting. lets see this quick example <script> var jsvariable ...

How to include HTML file in PhoneGap

Follow the below steps to include a PhoneGap HTML file.- 1-The format-detection this meta tag smiply disables the abilty for device. 2- The msapplication-tap-highlight" meta tag is a only tag which disable tap highlighting for links. 3-The "...

Difference between the different services in AngularJS

AngularJs provide different services to organise and reuse the code multiple times in the app. These are the two services: 1. Service 2. Factory These services are singleton objects. Lets Discuss them: 1. Service: Service are singleton ob...

How to get mouse current position

According to my below code, when we will move the mouse to anywhere like left or right up and down we get the current status of the swipe. Here i have used mousemove() method . $(function() { //Enable swiping... $("#test"...

Difference between setTimeout(), setInterval() in Javascript

In Javascript we can execute some code at specific time intervals. These are called timing events. There are two methods that are used: 1.setInterval() 2.setTimeout() setInterval() Method : The setInterval() method executes the function ...

Difference between slice and delete method in javascript

splice() : it is used to delete an item from an array that effects array length. delete() : it replaces the item with undefined instead of the removing it from the array. It means that it does not effect the array length. note:Instead of usin...

How to Change HTML Content in JavaScript

With the help of this javascript function we can change the html content of an element., when we will click on button it will manipulate the DOM (change HTML contents). <p class="demo">Hello everyone </p> <button type="b...

Trigger function in JQuery

Trigger function has an interesting concept as it is used to execute all handlers and behaviors attached to the matched elements for the given event type. For example, If I want to have a click event on a button without clicking, we can use this...

How to make Geolocation Watch Position Distance Calculator between two city

In below example, I am calculating the distance between center of Mumbai City to Pune. Using geolocation we get current location and monitor it using the watch position method. On this type we will be calculating the distance between starting p...

How to save image from url into device photo gallery

If you want to save image from url, you have to merge the following code to you js file First of all, we have to add the following plug-in to read, write and navigate file system. Write this in your code: cordova plugin add org.apache.cord...

How to validate dynamically genetrated form using javascript

If you want to validate the dynamically generated form using javascript: You can use this code : HTML : <div id="example"> <form id="newForm"> <input type="text" name="email" id="email" value="mail" /&g...

Difference between attr() and prop() in JQuery

Many of us uses JQuery.attr() and JQuery.prop() and get the same result, as there is a small difference between the two. Lets discuss it one by one. JQuery.attr() : It generates the value of an attribute for the first element in the set of m...

Remove current label or input field in jquery

Hello, I am writing the code through which we can remove particular label or input field on the click of delete button.It is mostly used when we have three or more forms user interface in our page. To execute the piece of code please add j...

Preventing child element from firing on click of Parent element

Suppose, we have this html where div element have 2 child p elements and 1 child anchor element. <div> <p> I am para one</p> <p> I am para two</p> <a href="http:nowheretogo.com">I am a link<...

Disabling All Effects

Your user or web application may require that all animations are disabled, but the effect of revealing information or scrolling (or whichever animation type) may still be required. jQuery has a way to disable all animations from one access point...

PHP array to JavaScript array conversion

Sometimes, I feel a need to get a PHP array in my JavaScript code. Earlier I make use of implode function of php but recently found new way using json_encode that works very effectively. Here is my php array: <?php $cool_epl_clubs_php =...
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: