Hi friends in this article I will explain about Latest jQuery interview questions and answers for freshers and experienced.The below questions and answers will help in interview.
What is JQuery?
What is JQuery?
Jquery
is a fast,cross-browser lightweight "write less, do more", JavaScript
library. JQuery also simplifies a lot of the complicated things from
JavaScript, like AJAX calls and DOM manipulation.
Difference between
$(document).ready() and $(window).load
1.we can can more than one
$(document).ready() but we can use only one $(window).load
2. document.ready()
function is called as soon as DOM is loaded where body.onload() function is
called when everything gets loaded on the page that includes DOM, images and
all associated resources of the page.
What is JQuery.noConflict?
As other
client side libraries like MooTools, Prototype can be used with jQuery and they
also use $() as their global function and to define variables. This situation
creates conflict as $() is used by jQuery and other library as their global
function. To overcome from such situations, jQuery has introduced
jQuery.noConflict().
When we
use jQuery noConflict mode, we are replacing the $ to a new variable and
assigning to jQuery some other JavaScript libraries
You can
of course still use jQuery, simply by writing the full name instead of the
shortcut
var jnc
= $.noConflict();
jnc(document).ready(function(){
jnc("button").click(function(){
jnc("p").text("using this also jQuery is working!");
});
});
jnc(document).ready(function(){
jnc("button").click(function(){
jnc("p").text("using this also jQuery is working!");
});
});
What is a CDN?
content
delivery network or content distribution network (CDN) is a large distributed
system of servers deployed in multiple data centers across the Internet. The
goal of a CDN is to serve content to end-users with high availability and high
performance.
What is the use of jQuery .each()
function?
The
each() method specifies a function to run for each matched element.
Example:
$(document).ready(function() {
//for radiobuttonlist checking.
$('.rbl').each(function() {
var checked = $(this).find('input:radio:checked');
if (checked.length == 0) {
alert("pls select atleast one radio button");
return;
}
else {
if (checked.val() == 1) { alert("checked
1"); }
if (checked.val() == 2) { alert("checked
2"); }
if (checked.val() == 3) { alert("checked
3"); }
}
});
What is difference between prop
and attr?
attr()
gives you the value of element as it was defines in the html on page load. It
is always recommended to use prop() to get values of elements which is modified
via javascript/jquery , as it gives you the original value of an element's
current state.
<input
type="text" value="txt" id="test"/>
$('#tbl1').change(function(){
alert('attr():
'+$(this).attr('value')); //shows txt
alert('prop(): '+$(this).prop('value'));
//shows the textbox's new value
});
This blog is really very well done as i am looking forward more things from your blog, your blog is really interesting keep it up.....
ReplyDeleteBest Implant Clinic In Chennai | Best Laser Clinic In Chennai | Best Dental Clinic In Vellore
This blog is very well done, i also got more interest in learning software courses, so please say about those things in a detail manner.
ReplyDeleteWeb Design Company in Chennai
This blog having the details of Processes running. The way of runing is explained clearly. The content quality is really great. The full document is entirely amazing. Thank you very much for this blog.
ReplyDeleteSeo Company in Chennai
Great Article… I love to read your articles because your writing style is too good, its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end.
ReplyDeleteHadoop Training in Chennai
Great post!I am actually getting ready to across this information,i am very happy to this commands.Also great blog here with all of the valuable information you have.Well done,its a great knowledge.
ReplyDeleteDigital Marketing Company in India
Hey Very nice Blog,Thanks For Sharing..
ReplyDeleteBest Php industrial training in Lucknow
best summer training in lucknow
Embedded system training in lucknow
Best Industrial training company in lucknow
best Php training center
java institutes in Lucknow
Asp.net training Center in Lucknow
Hey Very nice Blog,Thanks For Sharing..
ReplyDeleteBest python training in lucknow
Python training in Lucknow
best Php training center
best summer training in lucknow
Asp.net training Center in Lucknow
Hey Very nice Blog,Thanks For Sharing..
ReplyDeleteAsp.net training Center in Lucknow
Best Php industrial training
Embedded system training in lucknow
This article is very much helpful and i hope this will be an useful information for the needed one. Keep on updating these kinds of informative things.
ReplyDeletebest seo training institute
I just see the post i am so happy to the communication science post of information's.So I have really enjoyed and reading your blogs for these posts.Any way I’ll be replay for your great thinks and I hope you post again soon.
ReplyDelete.Net Development Services
Hire .Net Developers India