I am trying to get the 31003 value from the attribute with jquery.
<a class= "findOption" data-clickaction="changeFilter" data-actionvalue=" {"Company":"31003", "val": "mostrecent";}" href="javascript:void(0);">Most Recent</a>
I have tried,
$(".findOptions").attr('Company').value();
$(".findOptions").attr('data-actionvalue');
I am stuck.
Companyis part of the string that is the value ofdata-actionvalue.Companyis itself not an attribute. So you would need to do some searching in that string. It is also invalid HTML because you have double double quotes.data-actionvalue=" {"andCompany":"will try act like another attribute."< used to block in / open close the attribute data.