This code creates an object customer1, with the data members, name, and year of birth and the member function gets customer information. It is also important to note the use of this keyword, which accesses the values correctly being used or referenced for the object concerned, Besides this, you can also create objects dynamically using the new keyword.
The methods inherited include:
- is prototype of
- has Own Property
- properties Enumerable
- value Of
- to String
There is no specific keyword like a namespace for implementing namespaces. However, namespaces can be implemented using the concepts of classes and objects. If you classify variables and methods into objects and access them as instances of these objects, then you are placing only the names of these objects in the global namespace, reducing the scope of the variables to the object that they belong to.
You can create objects for specific types of objects like manager technical, manager general, technical staff, recruitment staff, and office staff and then classify them into objects, technical staff, which includes the objects manager technical and technical staff, and admin staff, which includes the manager general, recruitment staff and office staff. In a similar manner, new functions can also be defined.
Working with jQuery
The list of functionalities that are available in jQuery include:
- Attributes, which are a group of methods that can be used for getting and setting attributes of the DOM elements.
- Ajax, which is a group of methods that provide support for synchronous and asynchronous server calls.
- Core Methods are the fundamental jQuery functions.
- Callbacks object is an object provided for the management of callbacks.
- Data Methods are methods that facilitate the creation of association between DOM elements and arbitrary data.
- CSS Methods are methods that can be used for getting and setting CSS-related properties.
- Dimensions are methods that can be used for accessing and manipulating the dimensions of DOM elements.
- A deferred object is an object that is capable of registering multiple callbacks while maintaining the data of state change and propagating the same from one callback to the next.
- Forms are methods that are used for controlling form-related controls.
- Traversing, this is a group of methods that provide support for traversing the DOM.
- Effects are methods that can be used for creating animations for your webpage.
- Events are methods used to perform event-based execution.
- Selectors are methods that can be used for accessing elements of DOM in CSS selectors.
- Offset are methods that are used to position the DOM elements.
- Utilities, which is a group of utility methods
Before getting to use jQuery, you will need to include it in your project. Once you have installed it and you are ready to use it for your project, the next step is to learn how to use it.
The next thing to know is that the jQuery code that you are hoping to use in your HTML page lies in the jQuery namespace, which has an alias $. Therefore, you can write either jQuery.feature or $.jFeature when referring to a feature of jQuery