PhpStorm jQuery.noConflict() css completion not working

85 Views Asked by At

$('#') // hint a list of id
var j = jQuery.noConflict()
j('#') // no hint
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

use context as in comments

2

There are 2 best solutions below

1
Anudep naidu On

<!-- Putting jQuery into no-conflict mode. -->
<script src="prototype.js"></script>
<script src="jquery.js"></script>
<script>
 
var $j = jQuery.noConflict();
// $j is now an alias to the jQuery function; creating the new alias is optional.
 
$j(document).ready(function() {
    $j( "div" ).hide();
});
 
// The $ variable now has the prototype meaning, which is a shortcut for
// document.getElementById(). mainDiv below is a DOM element, not a jQuery object.
window.onload = function() {
    var mainDiv = $( "main" );
}
 
</script>

0
AudioBubble On

I think the answer is template/auto-expand, like if I have a template $(' name of jj, so jj + tab will give me what I want... not that I type slow, I just prefer hacking and im learning to be a lazy programmer