Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 97327

Visual Studio Code: id tag autocompletion not working in `$("#xxx")`

$
0
0

Struggling to understand why Visual Code autocomplete is not working for the following scenario. HTML code:

<html>
<head>
    <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
</head>
<body>

    <div id="idTag">abc</div>

    <script>
        $('#i')
    </script>
</body>
</html>

My user settings include:

"editor.quickSuggestions": {
        "other": true,
        "comments": true,
        "strings": true
      }

This allows autocomplete for any text in the current file, but autocomplete does not work for the #idTag so that $('#i...') suggests "idTag" in the autocomplete list.

Extensions installed:

HTML CSS Support

Intellisense for CSS class names in HTML

...

Here's a screenshot: enter image description here

I'd appreciate suggestions.

Thanks


Viewing all articles
Browse latest Browse all 97327

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>