Skip to Content

TheBlogReaders.com

Salesforce.com, PHP, MySQL, Javascript, Ajax, Htacces

JQuery Interview Questions and Answers For Graduates Part-4

Be First!

jquery31.Which built-in method sorts the elements of an array?
sort() method sorts the elements of an array.

32.Which built-in method returns the characters in a string beginning at the specified location?
substr() method returns the characters in a string beginning at the specified location through the specified number of characters.

33.Which built-in method returns the calling string value converted to lower case?
toLowerCase() method returns the calling string value converted to lower case.

34.Which built-in method returns the calling string value converted to upper case?
toUpperCase() method returns the calling string value converted to upper case.

35.Which built-in method returns the string representation of the number’s value?
toString() method returns the string representation of the number’s value.

36.What is a jQuery selector?
A jQuery Selector is a function which makes use of expressions to find out matching elements from a DOM based on the given criteria. Simply you can say, selectors are used to select one or more HTML elements using jQuery. Once an element is selected then we can perform various operations on that selected element. jQuery selectors start with the dollar sign and parentheses – $().

37.How to resolve confict with another JavaScript library if $ is already being in use?
The factory function $() is a synonym of jQuery() function. So in case you are using any other JavaScript library where $ sign is conflicting with some thing else then you can replace $ sign by jQuery name and you can use function jQuery() instead of $().

38.How to select elements using jQuery with the given element tag-name?
$(‘tag-name’) selects all element of type tag-name in the document. For example, $(‘p’) selects all paragraphs <p> in the document.

39.How to select single element using jQuery with the given element id some-id?
$(‘#some-id’) selects the single element in the document that has an ID of some-id.

40.How to select elements using jQuery whose css class is some-class?
$(‘.some-class’) selects all elements in the document that have a class of some-class.

 

(165)

Previous
Next

Leave a Reply