Jquery

Jquery

Adding event listener to the dynamic html elements

Oct 2022

Now in this example, we want to add an event listener to all <a> elements. The problem is that the list in this example is dynamic. <li> ele...

Continue reading
Jquery

Difference between $(document).ready() and $(window).load()

Oct 2022

$(window).load() was deprecated in jQuery version 1.8 (and completely removed from jQuery 3.0) and as such should not be used anymore. Th

Continue reading
Jquery

Attaching events and manipulating the DOM inside ready()

Oct 2022

An element within the DOM can be manipulated by selecting it and storing a reference to it...

Continue reading
Jquery

Document-ready: what is it and how do I use it?

Oct 2022

jQuery code is often wrapped in jQuery(function($) { ... }); so that it only runs after the DOM has finished load...

Continue reading
Jquery

Add and remove html attributes using jquery

Oct 2022

If you want to add an attribute to some element you can use the attr(attributeName, F...

Continue reading
Jquery

Get the attribute value of a HTML element using jquery

Oct 2022

When a single parameter is passed to the .attr() function it returns the value of passed attribute on the selected element.

Continue reading
Jquery

jQuery each function

Oct 2022

lets see how to use for each function to read html elements.

Continue reading
Jquery

Combining selectors using jquery

Oct 2022

A single result can be created by combining any number of selectors. It is effective to choose several elements with this multiple expression combinator.

Continue reading
Jquery

Caching selectors using jquery

Oct 2022

Each time you use a selector in jQuery the DOM is searched for elements that match your query. Doing this too often or repeatedly will decrease performanc..

Continue reading
Jquery

All Jquery selectors type with example

Oct 2022

A jQuery selectors selects or finds a DOM (document object model) element in an HTML document. It is used to select HTML elements ba...

Continue reading