jQuery Mobile

  Home  Client Side Scripting  jQuery Mobile


“jQuery Mobile frequently Asked Questions in various jQuery Mobile job Interviews by interviewer. The set of questions here ensures that you offer a perfect answer posed to you. So get preparation for your new job hunting”



77 JQuery Mobile Questions And Answers

61⟩ Tell me how to executed jQuery selectors?

Your last selectors is always executed first. For example, in below jQuery code, jQuery will first find all the elements with class ".myCssClass" and after that it will reject all the other elements which are not in "p#elmID".

 238 views

62⟩ Explain chaining in jQuery?

Chaining is one of the most powerful feature of jQuery. In jQuery, Chaining means to connect multiple functions, events on selectors. It makes your code short and easy to manage and it gives better performance. The chain starts from left to right. So left most will be called first and so on.

$(document).ready(function(){

$('#dvContent').addClass('dummy');

$('#dvContent').css('color', 'red');

$('#dvContent').fadeIn('slow');

});​

The above jQuery code sample can be re-written using chaining.

​$(document).ready(function(){

$('#dvContent').addClass('dummy')

.css('color', 'red')

.fadeIn('slow');

});​

Not only functions or methods, chaining also works with events in jQuery

 238 views

65⟩ Explain event.PreventDefault?

The event.preventDefault() method stops the default action of an element from happening. For example, Prevents a link from following the URL.

 233 views

66⟩ Explain various methods to make ajax request in jQuery?

Using below jQuery methods, you can make ajax calls:

► load() : Load a piece of html into a container DOM

► $.getJSON(): Load JSON with GET method.

► $.getScript(): Load a JavaScript file.

► $.get(): Use to make a GET call and play extensively with the response.

► $.post(): Use to make a POST call and don't want to load the response to some container DOM.

► $.ajax(): Use this to do something on XHR failures, or to specify ajax options (e.g. cache: true) on the fly.

 235 views

70⟩ Explain source maps in jQuery?

In case of jQuery, Source Map is nothing but mapping of minified version of jQuery against the un-minified version. Source map allows to debug minified version of jQuery library. Source map feature was release with jQuery 1.9.

 224 views

71⟩ Explain finish method in jQuery?

The .finish() method stops all queued animations and places the element(s) in their final state. This method was introduced in jQuery 1.9.

 221 views

74⟩ Explain jQuery UI?

jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library that can be used to build interactive web applications.

 226 views

76⟩ Explain jQuery plugin?

A plug-in is piece of code written in a standard JavaScript file. These files provide useful jQuery methods which can be used along with jQuery library methods.

 232 views

77⟩ Tell me how to use migrate jQuery plugin if possible?

with release of 1.9 version of jQuery, many deprecated methods were discarded and they are no longer available. But there are many sites in production which are still using these deprecated features and it's not possible to replace them overnight. So jQuery team provided with jQuery Migrate plugin that makes code written prior to 1.9 work with it.

So to use old/deprecated features, all you need to do is to provide reference of jQuery Migrate Plugin.

 224 views