title: A text inside a class should check for a text in another class and if it matches change the css style of the first text
body: <p>This is my second question in stackoverflow and please excuse me for any mistakes..now my question is...
  Assume there are two elements with two classes.</p>
  
  <p>first className is <strong>topics</strong></p>
  
  <pre><code>&lt;p class="topics"&gt;9-3-5-8&lt;/p&gt;
  </code></pre>
  
  <p>second className is <strong>complete</strong> inside a span tag</p>
  
  <pre><code>&lt;a  href="mychapter.php?chapter=gst_in_india_-_an_introduction"&gt;&lt;p class="chapters"&gt;&lt;span  class="complete"&gt;6 &lt;/span&gt;GST IN INDIA - AN INTRODUCTION&lt;/p&gt;&lt;/a&gt;            
  &lt;a  href="mychapter.php?chapter=taxable_event_-_supply"&gt;&lt;p class="chapters"&gt;&lt;span  class="complete"&gt;5 &lt;/span&gt;TAXABLE EVENT - SUPPLY&lt;/p&gt;&lt;/a&gt;            
  &lt;a  href="mychapter.php?chapter=charge_of_gst"&gt;&lt;p class="chapters"&gt;&lt;span  class="complete"&gt;4 &lt;/span&gt;CHARGE OF GST&lt;/p&gt;&lt;/a&gt;            
  &lt;a  href="mychapter.php?chapter=exemptions_from_gst"&gt;&lt;p class="chapters"&gt;&lt;span  class="complete"&gt;3 &lt;/span&gt;EXEMPTIONS FROM GST&lt;/p&gt;&lt;/a&gt;            
  &lt;a  href="mychapter.php?chapter=_place_of_supply"&gt;&lt;p class="chapters"&gt;&lt;span  class="complete"&gt;1 &lt;/span&gt; PLACE OF SUPPLY&lt;/p&gt;&lt;/a&gt;            
  &lt;a  href="mychapter.php?chapter=time_of_supply"&gt;&lt;p class="chapters"&gt;&lt;span  class="complete"&gt;2 &lt;/span&gt;TIME OF SUPPLY&lt;/p&gt;&lt;/a&gt;            
  &lt;a  href="mychapter.php?chapter=value_of_supply"&gt;&lt;p class="chapters"&gt;&lt;span  class="complete"&gt;7 &lt;/span&gt;VALUE OF SUPPLY&lt;/p&gt;&lt;/a&gt;            
  &lt;a  href="mychapter.php?chapter=input_tax_credit"&gt;&lt;p class="chapters"&gt;&lt;span  class="complete"&gt;8 &lt;/span&gt;INPUT TAX CREDIT&lt;/p&gt;&lt;/a&gt;            
  &lt;a  href="mychapter.php?chapter=registration"&gt;&lt;p class="chapters"&gt;&lt;span  class="complete"&gt;9 &lt;/span&gt;REGISTRATION&lt;/p&gt;&lt;/a&gt;            
  &lt;a  href="mychapter.php?chapter=_tax_invoice,_credit_and_debit_notes"&gt;&lt;p class="chapters"&gt;&lt;span  class="complete"&gt;10 &lt;/span&gt; TAX INVOICE, CREDIT AND DEBIT NOTES&lt;/p&gt;&lt;/a&gt;   
  </code></pre>
  
  <p>Now each <strong>text</strong> inside the span element with a class name <strong>complete</strong> should read the text inside the <strong>topics class</strong> for example as 5 is in 9-5-3-8 now span tag css color value should be changed...I am facing trouble with this issue any help is highly appreciated..</p>
  
  <p><a href="https://i.stack.imgur.com/0nzKS.png" rel="nofollow noreferrer">screenshot shot of current page</a></p>
  
  <p><a href="https://i.stack.imgur.com/9Rv3h.png" rel="nofollow noreferrer">screenshot of required page</a></p>