'Modal not showing up through text link

I am trying to make a modal pop up by pressing a text link, but ive come across a pretty troublesome thing.

this is my code so far:

(this is part of a bigger project but ive simplified it to what its kind of like.)

    <a href="#test" data-toggle="modal" class="more-link">Modal</a>

<div class="modal fade" id="test" tabindex="-1" role="dialog">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            </div>
            <div class="modal-body">
                TESTING
            </div>
        </div>
    </div>

</div>

my problem is that if I try it out on jsfiddle. it works fine, but when I try it out on my IDE (VSCode) it doesnt work at all. Have I missed something?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source