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 function is used to prevent code from running, before the document is finished loading?


What scripting language is jQuery written in?


What is the correct jQuery code for making all div elements 100 pixels high?


Which jQuery method is used to perform an asynchronous HTTP request?


Which jQuery method is used to set one or more style properties for selected elements?