javascript - Find a link attribute depending on an other attribute and the link value -


I have some links like this:

  & lt; A href = "..." Data-pk = "xxx" data-model = "xxx" & gt; Link text & lt; / A & gt;  

And I am trying to use the link-text and data-pK data-model value.

  params.model = $ ("a [data-pk =" + params.pk + " 

] "). Ether ("data-model");

But I have to do a mail pk and link text. My link text is available in params.value

Use: in Pseudo -selector:

  $ ("a [data-pk =" + params.pk + "]: In it (" + params.value + ")")  < / Pre> 

Comments