Jquery
Adding event listener to the dynamic html elements
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 readingDifference between $(document).ready() and $(window).load()
$(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 readingAttaching events and manipulating the DOM inside ready()
An element within the DOM can be manipulated by selecting it and storing a reference to it...
Continue readingDocument-ready: what is it and how do I use it?
jQuery code is often wrapped in jQuery(function($) { ... }); so that it only runs after the DOM has finished load...
Continue readingAdd and remove html attributes using jquery
If you want to add an attribute to some element you can use the attr(attributeName, F...
Continue readingGet the attribute value of a HTML element using jquery
When a single parameter is passed to the .attr() function it returns the value of passed attribute on the selected element.
Continue readingjQuery each function
lets see how to use for each function to read html elements.
Continue readingCombining selectors using jquery
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 readingCaching selectors using jquery
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 readingAll Jquery selectors type with example
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