-1

i'm a newbie of AngularJS (using v1.5) anh now I have a problem: I use javascript jquery.marquee (https://aamirafridi.com/jquery/jquery-marquee-plugin) in html same that:

<script type="text/javascript">
    $(document).ready(function () {
        $('.marquee').marquee({
            duration: 5000,
            gap: 50,
            delayBeforeStart: 0,
            direction: 'up',
            duplicated: true
        });
    });
</script>

but it shows error "marquee is not a function" (as image that I have attached)

enter image description here


i have putted it in html:

<script src="//cdn.jsdelivr.net/jquery.marquee/1.4.0/jquery.marquee.min.js" 
        type="text/javascript">
</script>

How to resolve it?

5
  • Did you loaded the jquery-marquee-plugin . Commented Nov 16, 2019 at 15:29
  • i have putted it in html: <script src="//cdn.jsdelivr.net/jquery.marquee/1.4.0/jquery.marquee.min.js" type="text/javascript"></script> Commented Nov 16, 2019 at 15:30
  • Directly enter marquee on console & check if the object exists or not. Commented Nov 16, 2019 at 15:32
  • i have a <div> tag with class = "marquee" and it always exitst Commented Nov 16, 2019 at 15:40
  • Please add code and errors as text (using code formatting), not images. Images: A) don't allow us to copy-&-paste the code/errors for testing; B) don't permit searching based on the code/error contents; and many more reasons. In general, code/errors in text format are much, much better than code/errors as an image, which are somewhat better than nothing. Images should only be used, in addition to text in code format, if having the image adds something significant that is not conveyed by just the text code/error. Commented Nov 17, 2019 at 16:13

2 Answers 2

0

Just try using $.noConfilct() function:

<script type="text/javascript">
    $.noConflict();
    $(document).ready(function () {
        $('.marquee').marquee({
            duration: 5000,
            gap: 50,
            delayBeforeStart: 0,
            direction: 'up',
            duplicated: true
        });
    });
</script>
Sign up to request clarification or add additional context in comments.

Comments

0

Load the jquery library before loading the marquee plugin:

$(document).ready(function () {
    $('.marquee').marquee({
        duration: 5000,
        gap: 50,
        delayBeforeStart: 0,
        //direction: 'up',
        duplicated: true
    });
});
<script src="//unpkg.com/jquery"></script>
<script src="//unpkg.com/jquery.marquee"></script>

<div class='marquee'>Lorem ipsum dolor sit amet, consectetur adipiscing elit END.</div>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.