jQuery Multiple choices

Total available count: 24
Subject - JavaScript Frameworks
Subsubject - jQuery

Which jQuery method should be used to deal with name conflicts?







jQuery noConflict alias:-
In the below example you can see that the $.noConflict() method is used with a custom alias name ‘jQueryAlias‘. This code will also give you the proper output.

<!DOCTYPE html>
<script src="https://code.jquery.com/jquery-3.2.1.js"></script>
jQueryAlias = $.noConflict();
jQueryAlias (document).ready(function(){
 jQueryAlias ("button").click(function(){
 jQueryAlias ("div").fadeToggle("slow"); // this is still working
width: 200px;
height: 100px;

padding: 20px;
margin: 20px;
background-color: yellow;


<div class="divBlock"></div>

jQuery uses the noConflict() method to avoid the conflict of using $ variable with other JavaScript variables. The above examples will give you an idea about the usage of the noConflict method in jQuery.

Next 5 multiple choice(s)


Which jQuery method is used to switch between adding/removing one or more classes (for CSS) from selected elements?


Look at the following selector: $("div p"). What does it select?


Is jQuery a W3C standard?


Look at the following selector: $("p#intro"). What does it select?


Which jQuery method is used to remove selected elements?