Select data-ctrtid
custom attribute to set style
HTML snip
<div class="expandListHeaderRow" data-ctryid="28fa1d89-eabe-44b5-b761-897b7835d7ab">South Africa</div>
This is dynamically created code and I capture the id correctly like this.
$('.expandListDetail').on('click', '.expandListHeader', function(){
var argument = $(this).closest('.expandListHeader').find('div').data('ctryid');
.
.
}
But after I refresh the list, I want to expand the list to the place where it was before. (this is a dynamic multi expandable/Collapsible list)
data('ctryid').css('display': 'block')
or somthing like this.
But how do you search for the specific ID of the custom attribute to target the element for CSS change?