jQuery

Date: 14–02–2022

jQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers. With a combination of versatility and extensibility, jQuery has changed the way that millions of people write JavaScript.

Assignment №21: DLithe_BC_NFS_T_Task22_jQuery

The task is to implement the webpages as per the below requirements

  1. Selectors
  2. Effects(Hide, Show, Toggle, Fade, Slide, Chaining, Callback function)
  3. Animation( animate())

jQuery Selectors

jQuery selectors are one of the most important parts of the jQuery library.

jQuery selectors allow you to select and manipulate HTML element(s).

jQuery selectors are used to “find” (or select) HTML elements based on their name, id, classes, types, attributes, values of attributes and much more. It’s based on the existing CSS Selectors, and in addition, it has some own custom selectors.

The element Selector

The jQuery element selector selects elements based on the element name.

$(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 element.

An id should be unique within a page, so you should use the #id selector when you want to find a single, unique element.

$(document).ready(function(){
$(“button”).click(function(){
$(“#test”).hide();
});
});

The .class Selector

The jQuery .class selector finds elements with a specific class.

$(document).ready(function(){
$(“button”).click(function(){
$(“.test”).hide();
});
});

2.Jquerry Effects

.animate()

Perform a custom animation of a set of CSS properties

.delay()

Set a timer to delay execution of subsequent items in the queue

.fadeIn()

Display the matched elements by fading them to opaque

.fadeOut()

Hide the matched elements by fading them to transparent

.hide()

Hide the matched elements

.slideDown()

Display the matched elements with a sliding motion

.toggle()

Display or hide the matched elements

Slide down
Hide / Show
Fade
Hide/Show
Chaining
Animation
Animation

Assignment №23: DLithe_BC_NFS_T_Task22_jQuery

The task given is to implement webpages as per the below requirements.

  1. Animations
  2. jQuery Methods
  3. Accordion and Autocomplete

jQuery Animation

The animate() method performs a custom animation of a set of CSS properties.

This method changes an element from one state to another with CSS styles. The CSS property value is changed gradually, to create an animated effect.

Only numeric values can be animated (like “margin:30px”). String values cannot be animated (like “background-color:red”), except for the strings “show”, “hide” and “toggle”. These values allow hiding and showing the animated element.

jQuery — Get text()

text() — Sets or returns the text content of selected elements

jQuery — Get html()

html() — Sets or returns the HTML content of selected elements

jQuery — Get val()

val() — Sets or returns the value of selected elements

jQuery — Get attr()

attr() — Sets or returns the value of attributes of selected elements

jquery — Set text()

text() — Sets or returns the text content of selected elements

jQuery — Set html()

html() — Sets or returns the HTML content of selected elements

jQuery — Set val()

val() — Sets or returns the value of selected elements

jQuery — Set attr()

attr() — Sets or returns the value of attributes of selected elements

jQuery — append()

append() — Inserts content at the end of the selected elements

jQuery — prepend()

prepend() — Inserts content at the beginning of the selected elements

jQuery — before()

before() — Inserts content before the selected elements

jQuery — after()

after() — Inserts content after the selected elements

jQuery — remove()

remove() — Removes the selected elements

jQuery — empty()

empty() — Removes all child nodes from the selected elements

jQuery — Accordion

Accordion Widget in jQueryUI is a jQuery based expandable and collapsible content holder that is broken into sections and probably looks like tabs. jQueryUI provides accordion() method to achieve this.

jQuery Autocomplete

Autocomplete is a jQuery plugin that provides a way to suggest matches as you type into an input field.

Accordian
Animation
get txt
set text
append
Autocomplete

DLithe_BC_NFS_T_Task24_C#

16-Feb-2022

1.Get Employee details and print them
2. Perform Arithmetic operations
3. Swap without using third variable
4. Find largest of 3 numbers

1.Get Employee details and print them
2. Perform Arithmetic operations
SWAP
4. Find largest of 3 numbers

DLithe_BC_NFS_T_Task25_C#

17-FEB-2022

1.Encapsulation (private, public)
2. Inheritance (protected)
3. 2 projects(assemblies) — internal

1. Encapsulation:

Encapsulation is defined as the wrapping up of data under a single unit. It is the mechanism that binds together code and the data it manipulates. In a different way, encapsulation is a protective shield that prevents the data from being accessed by the code outside this shield.

  • Technically in encapsulation, the variables or data of a class are hidden from any other class and can be accessed only through any member function of own class in which they are declared.
  • As in encapsulation, the data in a class is hidden from other classes, so it is also known as data-hiding.
  • Encapsulation can be achieved by: Declaring all the variables in the class as private and using C# Properties in the class to set and get the values of variables.

2. Inheritance:

Inheritance is an important pillar of OOP(Object Oriented Programming). It is the mechanism in C# by which one class is allowed to inherit the features(fields and methods) of another class.

Important terminology:

  • Super Class: The class whose features are inherited is known as super class(or a base class or a parent class).
  • Sub Class: The class that inherits the other class is known as subclass(or a derived class, extended class, or child class). The subclass can add its own fields and methods in addition to the superclass fields and methods.
  • Reusability: Inheritance supports the concept of “reusability”, i.e. when we want to create a new class and there is already a class that includes some of the code that we want, we can derive our new class from the existing class. By doing this, we are reusing the fields and methods of the existing class.

3. 2 projects(assemblies) — internal

Assemblies form the fundamental units of deployment, version control, reuse, activation scoping, and security permissions for .NET-based applications. An assembly is a collection of types and resources that are built to work together and form a logical unit of functionality. Assemblies take the form of executable (.exe) or dynamic link library (.dll) files, and are the building blocks of .NET applications. They provide the common language runtime with the information it needs to be aware of type implementations.

Assembly is a technique where we can merge the two projects or we can use the properties of one project in another this will help the reducing the coding.

Inheritance
Encapsulation
Assembly

— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —

DLithe_BC_NFS_T_Task26_C#

17-Feb-2022

1D ARRAY
2. 2D ARRAY
3. JAGGED ARRAY
4. PARAMS ARRAY
5. ARRAY METHODS

1.Single Dimensional Array

Single-dimensional arrays are the simplest form of arrays. These types of arrays are used to store number of items of a predefined type. All items in a single dimension array are stored in a row starting from 0 to the size of array

2.Multidimensional arrays (rectangular arrays)

Arrays can have more than one dimension; these arrays-of-arrays are called multidimensional arrays. They are very similar to standard arrays with the exception that they have multiple sets of square brackets after the array identifier.

3.Jagged Arrays (array-of-arrays)

Jagged arrays are often called array of arrays. More specifically, a jagged array is an array of vectors. Unlike rectangular arrays, a jagged array, as the name implies, is jagged as each vector in the array can be of different length.

4. PARAMS ARRAY:

Params is an important keyword in C#. It is used as a parameter which can take the variable number of arguments.

Important Point About Params Keyword :

  • It is useful when programmer don’t have any prior knowledge about the number of parameters to be used.
  • Only one Params keyword is allowed and no additional Params will be allowed in function declaration after a params keyword.
  • The length of params will be zero if no arguments will be passed.
1D Array
2D array
Jagged array
Param array

— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —

DLithe_BC_NFS_T_Task28_C#Debugging

Debugging

Debugging completed

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store