Justin
Justin

Reputation: 45350

jQuery attribute selector based on value with periods in it

Trying:

$("div.docs-right div.api-manager div[ng-model=page.api.examples]").length

This breaks with:

Uncaught Error: Syntax error, unrecognized expression: div.docs-right div.api-manager div[ng-model=page.api.examples]

How do I select by ng-model=page.api.examples?

Upvotes: 2

Views: 41

Answers (1)

alexandre-tsu-manuel
alexandre-tsu-manuel

Reputation: 412

Try this :

    $("div.docs-right div.api-manager div[ng-model=\"page.api.examples\"]").length

Upvotes: 2

Related Questions