jQuery not working with ng-repeat results

后端 未结 3 604
余生分开走
余生分开走 2020-12-14 12:33

I am using ng-repeat to build an accordion using jQuery and TB. For some reason, this is working perfectly when hardcoded but fails to trigger on click when inside of the ng

3条回答
  •  执念已碎
    2020-12-14 12:44

    When we use ng-repeat and need to trigger a jquery click event just try this it worked for me.

      $(document).on("click", ".className", function() {
    
       //your code here...
    
      });
    

提交回复
热议问题