JQuery

Jquery Intro

Jquery Intro In the dynamic realm of web development, jQuery stands as a cornerstone technology that has redefined the way we interact with and manipulate web content. This comprehensive introduction delves into the fundamental concepts of jQuery, providing a fresh perspective on its capabilities, features, and benefits. From simplifying DOM manipulation to streamlining event handling, …

Jquery Intro Read More »

Jquery Syntax

jQuery Syntax jQuery is a JavaScript library that makes it easier to work with HTML documents and handle events, animations, and AJAX requests. The library provides a simple syntax that is designed to be easy to read and write. Here are some examples of jQuery syntax: Select an element: $(“selector”) This code selects an element …

Jquery Syntax Read More »

Jquery Selectors

The element Selector The jQuery element selector selects elements based on the element name. You can select all <p> elements on a page like this:   $(document).ready(function(){   $(“button”).click(function(){     $(“p”).hide();   }); });   The #id Selector The jQuery #id selector uses the id attribute of an HTML tag to find the specific …

Jquery Selectors Read More »

Jquery Events

What are Events? All the different visitors’ actions that a web page can respond to are called events. An event represents the precise moment when something happens. Examples: moving a mouse over an element selecting a radio button clicking on an element The term “fires/fired” is often used with events. Example: “The keypress event is …

Jquery Events Read More »

Jquery Hide and Show

jQuery hide() and show() With jQuery, you can hide and show HTML elements with the hide() and show() methods: $(“#hide”).click(function(){   $(“p”).hide(); }); $(“#show”).click(function(){   $(“p”).show(); }); $(selector).hide(speed,callback); $(selector).show(speed,callback); The optional speed parameter specifies the speed of the hiding/showing, and can take the following values: “slow”, “fast”, or milliseconds. The optional callback parameter is a …

Jquery Hide and Show Read More »

Jquery Fade

jQuery fadeIn() Method The jQuery fadeIn() method is used to fade in a hidden element. $(selector).fadeIn(speed,callback); The optional speed parameter specifies the duration of the effect. It can take the following values: “slow”, “fast”, or milliseconds. The optional callback parameter is a function to be executed after the fading completes. The following example demonstrates the …

Jquery Fade Read More »

Jquery Slide

jQuery slideDown() Method The jQuery slideDown() method is used to slide down an element. Syntax: $(selector).slideDown(speed,callback); The optional speed parameter specifies the duration of the effect. It can take the following values: “slow”, “fast”, or milliseconds. The optional callback parameter is a function to be executed after the sliding completes. The following example demonstrates the …

Jquery Slide Read More »

Jquery Animate

jQuery Animations – The animate() Method jQuery’s animate() method is a powerful tool for creating dynamic and engaging animations on a web page. The animate() method allows you to change CSS properties of an element over time, creating smooth transitions and transformations. The animate() method takes two parameters: the CSS properties to animate, and the duration of the …

Jquery Animate Read More »

Jquery Stop

jQuery stop() Method The jQuery stop() method is used to stop an animation or effect before it is finished. The stop() method works for all jQuery effect functions, including sliding, fading and custom animations. $(selector).stop(stopAll,goToEnd); The optional stopAll parameter specifies whether also the animation queue should be cleared or not. Default is false, which means …

Jquery Stop Read More »

Jquery Callback

jQuery Callback Functions JavaScript statements are executed line by line. However, with effects, the next line of code can be run even though the effect is not finished. This can create errors. To prevent this, you can create a callback function. A callback function is executed after the current effect is finished. Typical syntax: $(selector).hide(speed,callback); …

Jquery Callback Read More »

Scroll to Top