Featured
-
How Regression Testing Detects Integral Errors In Business Processes
Humans are forever changing and evolving and so to
by kristina.rigina -
Get Display Banner Advertising Opportunity on FindNerd Platform
“Do you have a product or service that nee
by manoj.rawat -
Android O Released with Top 7 New Features for App Developers
Android was founded by Andy Rubin, Rich Miner, Nic
by sudhanshu.tripathi -
Top 5 Features That Make Laravel the Best PHP Framework for Development
Laravel is a free open source Web Framework of PHP
by abhishek.tiwari.458 -
Objective C or Swift - Which Technology to Learn for iOS Development?
Swift programming language is completely based on
by siddharth.sindhi
Tags
How to make HTML by using the Json Array
Hello Reader's
If you having the data coming from the Json array and you need it to show in html table. Then you can perform the short Jquery action for making it automated restful service.
Here the code of javascript
var _table_ = docum...
Difference among bind(), live(), delegate(), on() methods in jQuery
Hello,
Most of the time we have a bit of confusion between the jQuery .bind(), .live(), .delegate(), and .on() methods and when they should be used. Here I am sharing some information regarding this:
bind() Method:
Syntax: .bind( eventTyp...
Display image before upload using javascript/jQuery
This post demonstrates how to display an image prior to uploading it on server.
This demo uses the JavaScript's readAsDataURL method of reader API which will read image as url.
<html>
<head>
<script src="https://a...
Google Charts with Jquery Ajax
If you are working on a Google chart and need some jquery ajax requirement, then this blog is quite useful. I found this very powerful and simple to implement. Find the link at the end of details:
Google Charts with Jquery Ajax
If you are w...
Custom Audio Player with Jquery Audio Controls Plugin
If you are working on audio player and got stuck to manage audio controls and this jquery plugin is very useful. Find the link at the end of following details to use this plugin:
Custom Audio Player with Jquery Audio Controls Plugin
Introdu...
How to load header and footer using Javascript
Hello Reader's. If you have developed the header and footer of the website separatly then it's very easy to make them render on a webpage. By using the JS you can call them with a single line of code as written below:-
<html>
<head&g...
Finding mouse cordinate by JQuery
By using jquery event.pageX and event.pageY we find the coordinate of mouse. The PageX event shows the edges from left and the PageY event shows the edges from top.
<!doctype html>
<html lang="en">
<head>
<meta cha...
How to upload multiple files using Jquery
Hello Reader's!. Now multiple files on a single getting in fashion so you can use any of the multiple upload library code, But here we'll see how to use Jquery and PHP to do the same
For getting it start we need a html form page and it'll go ...
Display image preview before upload using jQuery
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
</head>
<body>
<img id="thumbnail" src="test.png" alt="Image"/>
...
How to make a redirect html page using jQuery
Redirecting a web page will occur in the header part of the page.
In JQuery the page redirect have a code and it will go like this below
// similar behavior as clicking on a link
window.location.href = "http://findnerd.com";
As soon thi...
Fading in and out an element using jQuery
Sometimes we want an image, control or element in a page to fade in and out of visibility .With jQuery it can be done easily. Below are examples of fade in and out method for a div element:
Fade In: fadeIn() method is used to fade in a hidd...
How to clear all textboxes in a form using jQuery
Hi readers !
In this blog we will see how we can clear all textboxes in a form using jQuery .
To clear a textbox with id 'txtBox1' in javascript we use below code :
document.getElementById('txtBox1').value = '';
We can use this cod...
How to set and get href attribute in jQuery?
Sometimes we need to set and get value of href attribute of <a> tag from jQuery. We can do this very easily by using element.attr() function in jQuery.
Example: for example you declare an <a> as below:
<a id="element_url" hr...
Reset or Retrieve value of all hidden type input box of FORM or DIV using jquery
Reset or Retrieve value of all hidden type input box of FORM or DIV using jQuery .each() method. You can use below code for this
<!DOCTYPE html>
<html>
<head>
<title>Reset or Retrieve value of all hidden ...
Image Crop Using Java and Jquery Crop (Jcrop)
FrontEnd:
Include jquery.Jcrop.css, jquery.Jcrop.js and jquery.Jcrop.min.js
Open an image in a div with a form. Take 4 hidden input fields:
<input type="hidden" id="x" name="x" /> // x coordinate of the image
<input type="hidde...
How to detect and validate credit card numbers in jQuery
If you want to detect and validate credit card numbers in jquery you can use the below code.
In this we use client side validation to verify the credit card type or user using valid card number.
It will display the type of detected credit c...
Custom events in jquery
When we think about the jquery then first thing comes in mind that is events so today we are going to discuss the custom events. Do you know about custom events? Its name has cleared the concept, means your own events. There are so many benefits ...
Basic Tutorial of Jquery Effects Method
About JQuery
jQuery is a cross-platform JavaScript library designed to simplify the client-side scripting of HTML.
jQuery's syntax is de...
Jquery return false vs preventDefault
Today we are going to discuss the diffence between return false and preventDefault. We mostly use these scripts but don't know their working so let's go we first discuss the preventDefault.
A) PreventDefault: it is helpful to stop the default ...
Jquery Return false, event.preventdefault and event.stopPropagation
Return False :-
Basically returning false is a way to tell your action (like button click event, submit and load etc. ) is not firing. Return false do the three basic things
event.preventDefault();
event.stopPropagation();
Stops the call...
How to Dynamically add element in DropDownList?
I have created a dropdownlist with the help of Jquery and javascript. In this, when we will enter the text in the field given, that value will be stored and will be added to the next list dynamically. Also We can easily remove all the items by ju...
Open Android App from Web Browser & Get Data from The App & Return Back to Web Browse
Sometime we a have a situation in which we use android app in our web application.In that situation you can use this.
For opening the android app first we have to check 2 conditions .
1. If the device is android or not.
2. In the android dev...
How to use Animated AJAX Record deletion in jQuery?
With the help of jQuery we can delete link for any record. On below code we have add a click event to triggers the ajax request. when the ajax request returns get success response.
$(document).ready(function() {
$('a.delete').click(fu...
script for copy to clipboard
Copy to clipboard.. You can see this option in most of the blogs. You can simply click on the link and it will copy the text which set as target. Today we are going to discuss the implementation of this feature. We can see different ways to do th...
Get the device which is used by the user
Sometimes we have to write down the different scripts for different devices. Now a days most used devices are mobiles/tablets. If you want to get the device type which user is using then you need to simply add this script in your code and call th...
How to pass values from one div to another div in same page
Hello reader!
If you want to send the value from one div to another div in your same webpage, you can do this by help of JavaScript function.
Lets do this with example-
This is the div from which the value is taken
<div id='td1'>T...
Foreach loop in javascript
If we need to use foreach loop in javascript then we can use jQuery $.each() function:
var data = [];
data[1] = "Mike";
data[2] = "Tom";
data[5] = "Harry";
data[12] = "John";
$.each(data, function( index, value ) {
alert( index + ": " ...
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"...
Progress bar
A Progress bar indicates the current percentage for completeness of an operation or process.
jQueryUI provides an easy-to-use progress bar widget that we can use to let users know the percent of completeness of an operation. jQueryUI provides...
How can we resolve conflict between prototype and jQuery?
To resolve a conflict between jQuery and prototype, use below method
jQuery.noConflict
and using jQuery instead of
$('code').code;
jQuery.noConflict();
jQuery(function($)
// $ is the jQuery object in here
// and doesn't conflict ...
How to bind onclick event function in JQuery
In the example below, I have created a bind onclick event function. when we will click on the button, element will dynamically added to DOM and it will bind the click event only to the elements that exist at the time of binding. To bind the cl...
How to Create Custom Jquery Tabs
Hello Reader's
In this article I will guide you how to create custom responsive tabs without use of any Jquery plugin.
This will surely make your web page faster because its not an plugin. Its an simple custom Jquery HTML & css.
Copy and p...
Sample application using JQuery, Spring MVC @RequestBody and JSON together
See the below steps to create sample application using JQuery, Spring MVC @RequestBody and JSON :
1- Define dependency for Spring, JSON in pom.xml as below:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/...
How to Create a Responsive Image Slider in jQuery
By using jquery image slider plugin we can create Responsive Image slider .In below example, I am using rslider plugin.
Step-1. Link files
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
&l...
What is the difference between '@' and '=' in directive scope
'@' is used to send the property from parentScope to isolatedScope. By transfer, you are not able to change the property of parentScope that is being pass. It is called one-way binding.
If the binding property is a primitive type, like interpo...
Error [jquery.form] terminating; zero elements found by selector jquery ajax image upload
If you are getting error while using the ajax uploading for an image and using jquery form.js script and getting the issue "[jquery.form] terminating; zero elements found by selector" .
Then for resolving this issue you have to avoid the neste...
Fetching JSON using angular JS
The controller defines a dependency to the $scope and the $http module. An HTTP GET request to the countries.json end point is carried out with the get method. It returns a $promise object with a success and an error method. Once successful, the ...
How to use upload files with JQuery
Here is the example for *How to use upload files with JQuery. *
If you having trouble with such issues, then use the below code.
Here is the HTML
<div class="flie-btn clearfix">
<input class="fileinput" type="file" name="d...
how to bind click event on dynamically created elements
Below is the example for how to bind click event on dynamically created elements.
If you having trouble with such issues, then use the below code.
Here is the HTML
<a href="#" class="button">Button</a>
<div class="lis...
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...
Ajax call using Javascript and JQuery
Ajax :
It is s process of getting or reteriving the content without refreshing the whole page.
We can do this using javascript and JQuery.
There are different method for ajax call in javascript and jquery.
Javascript :
<script...
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...
Select multiple elements with same ID using JQuery
ID's in HTML are generally used as unique identifiers for the elements present in the DOM but it is not a compulsion to have only one element with a unique ID, which means you can have multiple elements with the same ID.
JQuery selector $("#id...
How to remove a HTML element using Jquery
Hello reader's,
Below is the example to Remove the HTML element using Jquery
If you having trouble with such issues, then use the below code.
Here is the HTML
<p>Write your text here.</p>
<p>Write your text here.<...
How to Get height width or element using Jquery
Hello reader's,
Below is the example for Getting height width or element using Jquery
If you having trouble with such issues, then use the below code to resolve such issues.
Here is the HTML
<button id="dummy-height">Get div Heigh...
Simple Parallax Effect with smooth scrolling Jquery
Hello reader's,
Below is the example for Simple Parallax Effect with smooth scrolling Jquery
If you having trouble with such issues, the use the below code.
Here is the HTML of Scroll trigger
<div class="carousel-indicators">
...
Jquery Chaining
Jquery Chaining:
Till now we know that Jquery statements are executed line by line i.e one line after the another, but there is a technique that allows executing multiple Jquery commands in a single line just one after ...
Add or Remove Class by Using Jquery
Hello Guys
The below example will guide you to add or remove class by using jquery.
So if you are stuck in such case follow the below code.
Here is the HTML Code
<nav>
<ul>
<li><a href="javascript:v...
jQuery Filtering
jQuery Filtering:
When we have to select a specific element out of various given elements filtering is required.
In Jquery there are some filtering methods divided into two groups:
1. Methods that s...
How to hide particular div with just one click?
Hi,
you want a condition in which the particular div, para or any other tag need to be disappear with just a single click see my code written in jquery as simplest.
<script>
$(document).ready(function(){
$("p").click(function()...