When i use JQuery like this it's not work
$(document).ready(function() {
alert("abc");
});
But When i use JQuery like this it's work
JQuery(document).ready(function() {
alert("abc");
});
How to config it's for use with "$"
Your problem has to do with scoping. Basically, some other plugin or library you are using is already using $ to alias something other than jQuery.
To use jQuery as you are used to, like $('#myInput').val(); you will need to place your code inside an IIFE - Immediately Invoked Function Expression. Inside that function, $ will be locally scoped to refer to jQuery and will work as you expect
// IIFE - Immediately Invoked Function Expression
(function($, window, document) {
// The $ is now locally scoped
// use $ normally inside here
}(window.jQuery, window, document));
I have also read that you can use the below, but I have not tested it:
jQuery(function($){
// The $ is now locally scoped
// use $ normally
});
please check in your code if some where you are using jQuery.noConflict(); The below link will give you more insight what it actually mean when it should be used jquery.noconflict
jQuery.noConflict()...