Featured
-
Top 10 Template Engines for JavaScript
What is a Template engine? Template Engines are
by nishant.mishra -
jQuery Accordion
Hello readers! In this Blog we will gain knowled
by vishwanath.rana -
How to make Numbered and bulleted list in HTML Editor with JavaScript
Hello all, Working with HTML Editor we wanted t
by gaurav.gautam -
How to hide particular div with just one click?
Hi, you want a condition in which the particula
by abhishek.tiwari.458 -
How to Create and Retrieve Array in Javascript?
If you want to store multiple values in a single v
by siddharth.shahi
Tags
substring() method in JavaScript String
JavaScript String substring() method : The substring() method is used to extract the sub string between two points. It returns the new substring. If start point is greater than end point then it swaps automatically these points, means substring(4...
What is .siblings() method in jQuery?
Hello Readers,
If we want to fetch or return the all sibling elements of the selected or matched elements then we use the .siblings() method in jQuery.
It is the elements that belong to the same parent.
Syntax :
selector.siblings( [se...
What is the use of jQuery filter?
Hello Readers,
Jquery filter is one of the jquery method. It is used to returns the elements that match the certain values from the object list.
Syntax :
selector.filter( selector )
Parameters :
selector
Below is the Code Ex...
How to redirect html page using jQuery ?
Welcome to findnerd, today we are going to discuss How to redirect html page using jQuery ?
In this blog you can see How to redirect html page ?
You can simply use the JavaScript "window.location" property to make a page redirect.
you c...
How to do Array Sort
Use the Array objects sort method:
var fruitArray = ['strawberry','apple','orange','banana','lime'];
alert(fruitArray.sort()); // returns apple,banana,lime,orange,strawberry
The Array objects sort method sorts the array elements alphabetic...
How to make validation for date and time using Javascript
Hello Reader's! if you want to make the Date time format validation in your form then you can use Javascript to validate.
Let's see the example below:-
your html will be go like this:-
<form method="POST" action="/javascript/validate-...
How to break array into string in Jquery
PHP Implode convert an array into string in PHP. If you are looking same functionality in jquery, please use below code::
var arrName = ["Saab", "Volvo", "BMW"];
var allname = arrName.join(', ');
alert(allname);
// arrName is a javascr...
How to get all check boxes values in array under Jquery
If you would like to get all selected check boxes value in an array. Please use the below code::
<table class="demo-table">
<tr><td><input type="checkbox" name="select[]" class="ab" value="1"></td></tr>
&l...
How to implement "Select All" in Jquery
If you would like to implement Select All/UnSelect check-boxes with jquery please follow the below code::
<table class="demo-table">
<tr><td><input type="checkbox" name="selectall" id="selectall">Select All</td>&...
substr() method in JavaScript String
JavaScript String substr() method : The substr() method is used to extract the sub-string from a string. It counts the index from 0. It returns the number of characters starts from the first parameter upto second parameter if passed. It doesn't m...
setInterval() method in JavaScript
In javascript sometime you have to perform task repeatedly, in that case setInterval() method can be handy to use.
Syntax:-
setInterval(function,time_in_milliseconds,param);
setInterval accept time in millisecond,
let try an example:...
split() method in JavaScript String
JavaScript String split() method : The split() method breaks the string into array of strings for a given expression. The string breaks from every point where the expression matched. For example if we give the blank expression then it will break...
What is the use of jQuery.data method in jquery?
Hello Readers,
jquery.data() method or we call it as $.data is the jquery method and it is used in this DOM element associate with the data and the JavaScript objects. And, this method is used to make the jquery code clear and concise.
Synt...
slice() method in JavaScript String
JavaScript String slice() method : The slice() method is used to extract the sub-string. The index is starts from 0. To return the string from last position use negative index.
Syntax of slice() method :
string.slice(start,end)
start...
What is the difference between find() and children() methods in jquery?
Hello Readers,
difference between find() and children() methods in jquery :
Both find() and childern() are jquery methods.
find() method is used to search the more then one level down the tree (DOM tree) while children() method is uesd ...
html vs text in jquery
Hello Readers,
Below is the difference between html() and text() methods in jquery:
Both .html() and .text() methods are used in jquery and both are jquery methods.
.html() is faster as compared to .text() method in jquery.
.html() meth...
How to pass variables and data from PHP to JavaScript ?
Welcome to findnerd, today we are going to discuss How to pass variables and data from PHP to JavaScript.
In this blog we demonstrate and describe passing PHP variables containing simple data types to JavaScript.
There are actually several ap...
toUpperCase() method in JavaScript
JavaScript String toUpperCase() method : The toUpperCase() method is used to convert the string to the upper case. It returns the new string as in upper case letters. It doesn't change the original string.
Syntax of toUpperCase() method :
...
How to use fadeToggle() Method in jQuery ?
Welcome to FindNerd
Today we are going to discuss fadeToggle() method in jQuery.
Firstly let know what use of fadeToggle() Method ?
In fadeToggle() Method if the elements are faded out, fadeToggle() will fade them in and if the elements...
How to check/uncheck a checkbox input or radio button?
First of all check if the checkbox is already checked or not.
jQuery('#my-checkbox').is(':checked');
If it is not checked then do it checked.
jQuery('#my-checkbox').attr('checked','checked');
And if it is already checked then make...
Attaching the page information to URLs
This post will help you to attach the page information to URLs, lets assume that If you want to store a small fragment of information to the URLs in such a way that the information should be available to anyone who is accessing the page.
The in...
How to add custom validation in validation.js
If you are using validation.js to add validation in your page and want to add some custom validation on the same, like I want a user can only enter alphabetic character with comma, dashes and space on first name text box. Please follow below cod...
search() method in JavaScript String
JavaScript string search() method : The search() method is used to search a specific string within a given string. It returns the index of the searched string and if no string matched then it returns the -1.
Syntax of the search() method :...
replace() method in JavaScript
JavaScript String replace() method : The replace() method is used to replace a string from new value. The replace() method has two parameters, first parameter is a string or regular expression which need to be replace by new value and the second ...
match() method in JavaScript String
JavaScript String match() method : We use match() method to match a string against a regular expression. It returns the array object of strings which matched if used with the /g modifier otherwise it returns the first matched string. It returns n...
Understanding The Global Object
The global object is a JavaScript's regular object that serves as a very important purpose: the properties of this object are the globally defined symbols that are available to a JavaScript program.
When the JavaScript execution starts, it creat...
What are various methods to make ajax request in jQuery?
Hello Readers,
Using below jQuery methods, you can make ajax calls.
load(): It's a jquery method and simple method in jquery and the most powerful AJAX method.Load method load the data from the server and returned the data and this return...
How to use HTML5 Local Storage
HTML5 Local Storage(Web Storage) mechanisms provides you the facility to store data much more easy way than cookies. Local storage save the data more secure then cookies, where cookie only can store data up to 5mb, local storage capacity is far l...
How to use Callback Function in jQuery ?
Welcome to FindNerd,
Today we are going to discuss on Callback Function in jQuery.
Firstly let know what is the use of Callback Function ?
This function is executed after the current effect is finished.
In simple way we can say that cal...
lastIndexOf() method in JavaScript String
JavaScript String lastIndexOf() method : The lastIndexOf() method returns the index of specified value where it last occurred. If no value is matched then this method returns the -1. As it is string the index starts from 0.
Syntax of lastInde...
indexOf() method in JavaScript String
JavaScript String indexOf() method : The indexOf() method is used to return the index value of specified string. It will give the index of string comes first from the start. We can also start searching by skipping the number of characters. If val...
How to use stop() method in jQuery ?
Welcome to findnerd, today we are going to discuss on stop() method in jQuery.
Firstly let know what is the use of stop() method ?
So basicaly stop() method is used for stoping animations or effects before it is finished.
syntex of stop(...
How to use slideToggle() Method in jQuery ?
Welcome to findnerd, today we are going to discuss on slideToggle() method in jQuery.
Firstly let know what use of slideToggle() method ?
The jQuery slideToggle() method toggles between the slideDown() and slideUp() methods.
syntex of sl...
How to use prepend() method in jQuery ?
Welcome to findnerd, today we are going to discuss on prepend() method in jQuery.
Firstly let know what use of prepend() method ?
prepend() method is used for inserting at the beginning of the selected elements in jQuery
you can see b...
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');
...
What is difference between .attr() and .prop() in jquery ?
Hello Readers,
.attr() and .prop() in jquery:
Both .attr() and .prop() are jquery methods.
jquery.attr() is used to get the value of an attribute for the set of matched elements while jquery .prop() is used to get the value of a property...
Javascript:Prompt Dialog Box
Prompt dialog Box is used to have an input from the users or to get confirmation on any input.
This dialog box is displayed using a method called prompt() which takes two parameters:-
(i) A label which you want to display in the text box. ...
How to create clone of any object using jQuery ?
Hello Readers,
If we create clone() of any object using jquery, then jquery provides the clone() method which performs the copy of the matched element (means it copies all the matched elements as well as of their descendant elements and nodes ...
Explain .bind() vs .live() vs .delegate() vs .on() in jquery?
Hello Readers,
.bind() vs .live() vs .delegate() vs .on() all these 4 are jquery methods and all are used for attaching events to selectors (elements).
.bind(): bind() method is the jquery method and it is one of the easiest and quick met...
How to use animate() method in jQuery ?
Welcome to findnerd, today we are going to discuss on prepend() method in jQuery.
Firstlt let know what use of prepend() method
So, basically animate() method is used to creating custom animations.
Syntex of animate() method
$(selector)...
How to use append() method in jQuery ?
Welcome to findnerd, today we are going to discuss on append() method in jQuery.
Firstly let know what use of append() method
Append() method is used for inserting at the end of the selected elements in jQuery
you can see bellow example h...
How to use toggle() method in jQuery ?
Welcome to findnerd, today we are going to discuss on toggle() method in jQuery.
Firstly let know what use of toggle() method
In the toggle() method, you can toggle between the hide() and show() methods in jQuery.
So we can say that toggle()...
Javascript:Confirmation Dialog Box
Confirmation dialog Box is used to get confirmation on any input. It is mostly used to take user's opinion on any option. It displays a dialog box with two buttons: Cancel and OK.
If the user clicks on the Cancel button, then confirm() returns...
How to create an alert dialog box in javascript
An alert is a type of dialog box supported in javascript and is mostly used to give a warning message to the users.
For example:
If one input field requires to enter some text but the user does not provide any input, then as a part of v...
How to create a responsive menu button
hii.
i am providing html,css and jquery code for creating a responsive menu button.
1.Here's the HTML code:
<body>
<nav class="topnavfirst">
<ul class="clr">
<li>
...
Javascript Carousel
Javascript Carousel
In javascript you can create a slideshow with the help of carousel.So multiple slides can be created making our presentation more attractive and user-friendly.
<div id="carousel-example-generic" class="carousel sli...
Javascript toggle
Javascript toggle
In javascript you can create toggle behaviour wit the help of flexible plugin that utilizes a handful of classes.
The class collapse hides the content,class collapsing is applied during transitions and class collapse.in show...
How to use hide() and show() methods in jQuery ?
Welcome to findnerd
Today we are going to discuss hide() method and show() method in jQuery
firstly, let start hide() method
hide() method is used for hiding data with HTML elements
Syntex of hide()
$(selector).hide();
And now abou...
How to use Array sort() Method in JavaScript ?
sort() method is used for sorting the items of an array.It sorts the values as strings in alphabetical and ascending order.
And sort() method sort alphabetic or numeric.
you can take reference of bellow example.
<!DOCTYPE html>
&l...
Replacing all occurrences of a string in javascript
String.replace method in javascript does not replace every occurrence of the string, it only replaces the first occurrence. To replace all occurrences of the string you must provide the replace() method a regular expression (or pass search string...