javascript not working in MVC webgrid after sorting or paging
问题 I am newbie in MVC and trying to polish concepts on webgrid . I have the following code in view @model IEnumerable<MVCMovies.Models.Movie> @{ ViewBag.Title = "Index"; } <script type="text/javascript"> $(function() { $('tbody tr').on('hover', (function () { $(this).toggleClass('clickable'); })); $('tbody tr').on('click', (function () { alert('rajeev'); })); }); </script> <style type="text/css"> .table { margin: 4px; width: 100%; background-color: #FCFCFC; } .head { background-color: #11E8CD;