[Solved] Make jQuery Select2 Plugin run offline (Without Internet)

Last Reply 20 days ago By pandeyism

Posted 20 days ago

i recently face issue that this link work on internet availibility ,please guide me same dropdown searching functionality which work without internet.

here is link of below drop image 

https://ibb.co/DCgtjRj

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/css/select2.min.css" />
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/select2.min.js"></script>
    <script type="text/javascript">
        $(function () {
            $(".js-example-placeholder-single").select2({
                placeholder: "Select",
                allowClear: true
            });
        });
    </script>

 

WorkerName :
<asp:DropDownList ID="DDlWrknam" runat="server" CssClass="form-control js-example-placeholder-single" ToolTip="Select" Height="16px">
</asp:DropDownList>

 

Posted 20 days ago

Hi akhter,

According to required cdn you need to add JavaScript File (js) and Style Sheet (css) from add new item and paste the relevant content to corresponding files.

Then import the files in the page to use it.