parthasarathy B

parthasarathy B

  • NA
  • 927
  • 107.4k

Jquery code doesn't work after SharePoint ListView paging

Nov 21 2018 12:34 AM
Hi all,
          I wrote custom onclick event for a class in jquery, i have attached the script with JS link of listview web part.There is default paging in the listview webp part.In first page the click event works perfectly but after navigating to the other pages the click event is not triggering.Any help would be helpful.thanks in advance.Sample code is given below.
 
  1. $(document).ready(function () {  
  2.     $('.ms-listlink').bind('onclick', function (e) {  
  3.         var documentURL = $(this).attr('href');  
  4.         var url = "https://Test.sharepoint.com/sites/TestSite/SiteAssets/TestPage.aspx?URL=" + documentURL;  
  5.         $(this).attr('href', url);  
  6.     });  
  7. });  
 
 
 

Answers (1)