I am new to sharepoint and using sharepoint 2016, in which I want to use select2 jquery plugin for dropdown list. Since sharepoint is a cms, I can't give specific class and id to the select field. so, I have used select2 for all the select field. Then when page is reloaded/refreshed it works and if I choose any one select field then page stops scrolling.

I have added script to the page. For testing purpose I have not saved the scripts locally. The code is below.

<script src="http://code.jquery.com/jquery-latest.js"   type="text/javascript"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery.SPServices/0.7.1a/jquery.SPServices-0.7.1a.min.js"></script>

<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/css/select2.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/js/select2.min.js"></script>

<script type="text/javascript" language="javascript">
$(document).ready(function() {
  • Are you adding this script on SharePoint OOTB forms ? – Siddharth Vaghasia Apr 17 '19 at 7:41
  • I embed the this script in script editor – Dinesh K Shrestha Apr 17 '19 at 8:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.