AngularJS: ng-click on img? Manipulating images (kind of gallery-like) with jQuery?

前端 未结 4 1900
暖寄归人
暖寄归人 2021-02-13 00:30

Should ng-click work with img tag ?


myFunction is defined in controller and is $scop

4条回答
  •  鱼传尺愫
    2021-02-13 01:14

    I ended up wrapping each image with link and changing jQuery appropriately. It was the fastest and easiest for me.

    
       
    
    

    And changed line

    var backImg = $('.commercial-container img:first');
    

    changed to

    var backImg = $('.commercial-container a:first');
    

提交回复
热议问题