Why does my jQuery plugin show up as text in WordPress?

I am attempting to install unslider jquery plugin for my WordPress website. I enter the below code inside my WordPress text editor and I don’t get the expected result.

<!-- The barebones HTML required for Unslider -->
<div class="banner">
    <ul><li>This is my slider.</li><li>Pretty cool, huh?</li></ul>
</div>

<!-- And the relevant JavaScript -->
<script src="//code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="/path/to/unslider.js"></script> <!-- but with the right path! -
->
<script>$(function() { $('.banner').unslider() })</script>

Output: https://s21.postimg.org/qs43sdtc7/unslider-not-working.png

Read more here: Why does my jQuery plugin show up as text in WordPress?

Leave a Reply

Your email address will not be published. Required fields are marked *