Category Archives: Javascript

How to identify user idle state by minutes using javascript / JQuery?

Descrption: i used with 20 minute of interval if user is in idle state from last 20 minute then it will call the timerIncrement() and then will check for 20 minutes if yes or not. Why i need this? i … Continue reading

Posted in angular-4, Javascript, jQuery | Tagged , , , , | Leave a comment

How To Update Old JQuery Scripts For Compatibility With JQuery 3 ?

jQuery v3.0 is considered the future of jQuery. It is a lighter, faster version and removes support to IE6-8 (like the previous 2.x branch). Old scripts built for earlier versions of jQuery may ‘break’, but thankfully, the jQuery team has … Continue reading

Posted in Javascript, jQuery | Leave a comment

What is javascript module/Class like php ?

Here i am going to explain javascript classes, How to add properties and methods using javascript class. Javascript uses self calling method called module there are different sections as following: Basic structure of javascript class: (function() { // declare private … Continue reading

Posted in Javascript | Leave a comment

What is javascript prototype?

Every JavaScript object has an internal property called [[Prototype]].we can set properties or methods to the javascript object which should created by new operator like var Father = new Person(“John”, “Doe”, 50, “blue”); Let’s see using example: function Person(first, last, … Continue reading

Posted in Javascript | Leave a comment

var functionName = function() {} vs function functionName() {}

The difference is that functionOne is only defined when that line is reached, whereas functionTwo is defined as soon as its surrounding function or script is executed, due to hoisting. For example: // Error functionOne(); var functionOne = function() { … Continue reading

Posted in Javascript | Leave a comment

What is the difference between $(window).load and $(document).ready?

here $ is used for define jQuery like $ = jQuery . $(document).ready is jQuery event that is fired when DOM is loaded, so it’s fired when the document structure is ready. $(window).load event is fired after whole content is … Continue reading

Posted in Javascript, jQuery | Leave a comment