jQuery Interview Questions

How can choose all elements in a page utilizing jquery?

To choose all elements in a page, we can utilize all selectors, for that we have to utilize *(asterisk symbol).

<script name="mAnsari" type="text/mAnsari">
$("*").css("Ansari", "2px specked blue");
</ansari>

Different advantages of JQuery

  • No compelling reason to learn new sentence structure’s to utilize jquery, knowing straightforward JavaScript punctuation is sufficient
  • Simple and Cleaner code, no compelling reason to compose a few lines of codes to attain complex usefulness

Difference between JQuery-x.x.x.js and JQuery.x.x.x-min.js

This term of functionality, there is no any deference between the JQuery-x.x.x.js and JQuery-x.x.x-min.js (additionally called minified version). However this can assume a basic part in the execution of the web page.

Why this version of JQuery file should be used?

In a large portion of the late discharges as such, the center usefulness of JQuery stays same however some better features are included. In a perfect world you should utilize the most recent JQuery files accessible on the JQuery website. By doing this you guarantee that your prior usefulness will at present work and you can utilize new features accessible as a component of the new discharge.

What do you mean by CDN?

CDN Stands for Content Distribution Network or additionally called Content Delivery Network is a gathering of machines put at different focuses associated with system containing duplicates of information files to expand transfer speed in getting to the information. In CDN a customer get to a duplicate of information closer to the customer area instead of all customers getting to

Why it is important to load jquery file from CDN?

You may inquire as to whether we can stack the jquery file from our server why to load it from the CDNs. The answer is logical and extremely straightforward. The program conduct is that at whatever point it stacks any site page, it keeps related files (eg. Javascript file, CSS file and Images) utilized for that page into its reserve (additionally called history). At the point when next time the client scans any website page, program stacks just those files that are new or altered and is not accessible in the program store or history. Along these lines, program enhances its execution and burdens the page.

The likelihood is that if more websites are utilizing CDNs, the client may have perused some other pages that is utilizing CDNs jquery file and that file may have into program reserve; so when client scan your page and you are additionally utilizing CDNs file, the more established stored version of jquery file will be utilized. Thusly your page will stack quicker as program won’t need to load the jquery file for your page once more.

The profit

  • Speedier page stack as jquery file require not to be downloaded
  • Spares your data transfer capacity as jquery file is not stacked from your server
  • Adaptable – for the most part CDNs place these files on the servers spotted at diverse topographical areas of the world so they stack speedier so independent of from where your client is scanning your page, your application runs well

Suppose it is possible that the most recent jquery version is accessible and I am even now eluding more seasoned version of jquery file from CDNs