Donovant
Donovant

Reputation: 3161

How modify an angular element, as a ng-repeat element, by jQuery?

I think the problem is that angular creates these elements with javascript, so after the jQuery domready. So jQuery doesn't see those elements into the DOM. What can i do?

HTML

<li ng-prepeat="el in els">{{el.attr}}</li>

JS

$("li").click(function(){ do something });

Upvotes: 0

Views: 202

Answers (1)

jamesy829
jamesy829

Reputation: 428

You can use ng-click to achieve the clicking of li

<li ng-repeat="el in els" ng-click="doSomething()">{{el.attr}}</li>

Upvotes: 1

Related Questions