<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: denkyira5544</title>
    <description>The latest articles on DEV Community by denkyira5544 (@denkyira5544).</description>
    <link>https://dev.to/denkyira5544</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1051178%2Fa69be759-5bf5-4997-8135-238154643ebe.png</url>
      <title>DEV Community: denkyira5544</title>
      <link>https://dev.to/denkyira5544</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/denkyira5544"/>
    <language>en</language>
    <item>
      <title>Show specific h5 tag</title>
      <dc:creator>denkyira5544</dc:creator>
      <pubDate>Thu, 23 Mar 2023 19:20:19 +0000</pubDate>
      <link>https://dev.to/denkyira5544/show-specific-h5-tag-21m2</link>
      <guid>https://dev.to/denkyira5544/show-specific-h5-tag-21m2</guid>
      <description>&lt;p&gt;I have multiple data-id to a class. I need to select a particular h5 that ID matched a parent ID.&lt;/p&gt;

&lt;p&gt;`&lt;br&gt;
&lt;/p&gt;
&lt;h5&gt;

&lt;/h5&gt;

&lt;h5&gt;

&lt;/h5&gt;

&lt;h5&gt;
&lt;br&gt;
`

&lt;/h5&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;


All that I am looking for is to select a specific h5 tag that data-id matches the Parent ID( var ParentID = $('#ddlSearch option:selected').val();) Then I can traverse the hierarchy from there.

$("#btn-search").click(function() {

  var ParentID = $('#ddlSearch option:selected').val();
  var selectedlastChild = $('.to-list).attr("data-id");  
  $('.list-container').each(function() {

    var delimiter = 'Id-';
    var ids = this.id.split(delimiter)[1];
    if (ParentID(399) === ids(399)) {
      if(selectedlastChild(399) ==ParentID(399))
     {
       show only &amp;lt;h5 class="to-list primary  data-id="399"&amp;gt; for example 
     and hide the rest
    }


  });



});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>javascript</category>
      <category>html</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
