Load js and css file after Button click using jQuery

Last Reply 2 months ago By dharmendr

Posted 2 months ago


When users click on menu, mega menu will appear I want when users click to see mega menu when they click on menu it loads script and css of mega menu.

I mean I don't want loads megamenu when page is loading I want load it just when users click on menubar

I use below code for megamenu in page:

                                    <script src='<%=ResolveUrl("~/scripts/jquery.dcmegamenu.1.3.3.js" ) %>'></script>
                                    <link href="Css/dcmegamenu.css" rel="stylesheet" />

                                    <div class="demo-container1">
                                        <div class="red">
                                            <ul id="mega-menu-2" class="mega-menu1">
                                                <li><a href="#" id="mainsoft">&nbsp</a>
                                                        <li><a href="#">آموزهای کاربردی</a>
                                                            <div id="mega1A">
                                                                <asp:Repeater ID="RptkarbordA" runat="server">
                                                                        <li><a target="_blank">
                                                                            <asp:LinkButton ID="Linkbtnclass" runat="server" CommandArgument='<%# Eval("Secondclass") %>'
                                                                                OnClick="LinkbtnclassA_Click"><%# Eval("Secondclass") %></asp:LinkButton></a></li>

How I can do it?

best regards


The reply you are looking for seems to be deleted or does not exist.
I agree, here is the link: https://www.e-iceblue.com/Introduce/spire-office-for-net-free.html