Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • this might actually work, but not sure yet how to dynamically generate the data=thumbid with an incrementing number as I am generating this html dynamically like this: var newelement = $compile('<div class="upload-thumb" ng-mouseover="hoverIn($event)" ng-mouseleave="hoverOut($event)"><span class="delete-media" ng-show="hoverEdit"><i class="mdi mdi-delete" ng-click="removeFromLibrary($event)"></i></span></div>')($scope); Commented Apr 10, 2017 at 11:23
  • Ok I didn't have this information ^^ I change my snippet so you can retrieve the element and do whatever you want to do with it ;) Commented Apr 10, 2017 at 11:30
  • One last bit. class has to be applied to previous sibling. If I could get this example would work. Commented Apr 10, 2017 at 12:01
  • I've updated my answer with another example, enjoy ! Commented Apr 10, 2017 at 12:16
  • 1
    You're welcome, it's not a lesson, just a little help ^^ Commented Apr 10, 2017 at 12:19