I want to apply mutliscroll effect to my webpage, so I coded this:
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Split Screen</title> <style> ... </style> </head> <body> <div id="multiscroll"> <div class="ms-left"> <div class="ms-section one"> <h1>Section 1 left</h1> <p>Professional Graphic Designer</p> <a href="#">Contact</a> </div> <div class="ms-section two">Section 2 left</div> <div class="ms-section three">Section 3 left</div> </div> <div class="ms-right"> <div class="ms-section four"></div> <div class="ms-section five"> <h2>Why Me?</h2> <p>I have wordsad adasdas asdasdasdas asdasda.</p> </div> <div class="ms-section six"> <h2>Contact Me</h2> <input type="text" placeholder="Your name"> <input type="email" placeholder="Your email"> <a href="#">Submit</a> </div> </div> </div> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script src="jquery.easings.min.js"></script> <script src="jquery.multiscroll.min.js"></script> <script> $(document).ready(function({ $('#multiscroll').multiscroll({ navigation:true, navigationPosition:'right', navigationColor:'#000', }) }); </script> </body> </html>
But the problem is that it looks like this:
And at Console, I get this error:
Uncaught SyntaxError: Invalid destructuring assignment target
So what’s going wrong here? How can I fix this issue?
I would really appreciate any idea or suggestion from you guys…
Thanks in advance.
Advertisement
Answer
Change your script to:
$(document).ready(function() { $('#multiscroll').multiscroll({ navigation:true, navigationPosition:'right', navigationColor:'#000' }) });