skip to Main Content

C# MVC read value inside a div using jquery

I am developing an Application in Asp.Net Core MVC6. I have a Razor page that render dynamically object. Assuming I have creating dynamically this two Divs in my page <div id="A1"> <input type="text" id="SearchSSN" /> <input type="text" id="SearchLastName" /> </div>…

VIEW QUESTION

Why does this jQuery list toggle code not work?

I totally wonder why this code doesn't work: $(document).ready(function() { $('ol ol').hide(); $('li').click(function() { $(this).children('ol').toggle(); }); }); <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <ol> <li>Coffee</li> <ol> <li>One</li> <li>Two</li> <li>Three</li> </ol> <li>Tea</li> <ol> <li>One</li> <li>Two</li> <li>Three</li> </ol> <li>Milk</li> <li>Cool</li> </ol> If you click for example…

VIEW QUESTION
Back To Top
Search