Category Archives: jQuery

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

jQuery Smooth Scroll to ID of n HTML element

You can use following code to scroll to ID of an element in HTML document You need to make sure the Jquery is previously included above following code // Add Smooth scrolling to all links jQuery(“a”).on(‘click’, function(event) { // Make … Continue reading

Posted in jQuery | Leave a comment

jQuery prototyping or What does jQuery.fn mean?

In jQuery, the fn property is just an alias to the prototype property. The jQuery identifier (or $) is just a constructor function, and all instances created with it, inherit from the constructor’s prototype. A simple constructor function: function Test() … Continue reading

Posted in jQuery | 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

How do you select a particular option in a SELECT element in jQuery?

$(‘.selDiv option[value=”SEL1″]’) $(‘.selDiv option:eq(1)’) $(‘.selDiv option:eq(1)’).prop(‘selected’, true) $(‘.selDiv option:eq(1)’).attr(‘selected’, ‘selected’)

Posted in jQuery | Leave a comment