1

$('#') // 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

LazyOne
  • 158,824
  • 45
  • 388
  • 391
  • IDE must read the jQuery file in order to parse and understand it. Either download and use local version(s) (non-minified version is preferred for development) .. or fetch remote one (invoke `Alt+Enter` on it). https://www.jetbrains.com/help/phpstorm/configuring-javascript-libraries.html?search=javascript%20lib – LazyOne Jun 10 '17 at 08:54
  • @LazyOne I did a test in a blank HTML page, one line div#id-of-div, in –  Jun 10 '17 at 11:38
  • @LazyOne it's Saturday here, or else i would have given some screenshots... –  Jun 10 '17 at 11:44
  • I see. For some reason I thought that you having issues with completion for actual jQuery methods ... while your question/issue about classes/ids completion. My apologies for a confusion. – LazyOne Jun 12 '17 at 10:55
  • @LazyOne my description is not well either, so "don't fall down apologizing" :) –  Jun 12 '17 at 11:18

2 Answers2

1

<!-- 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>
  • Thank you for answer, but typing a single j instead of shift 4 is what I really want –  Jun 10 '17 at 05:51
1

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