Wrap each matching element in DIV

Wrap each matching element in DIV

I am trying to wrap each matching elment in a DIV.  I.E every time an element in Group A matches an elemnt in Group B, wrap them both in a DIV. With the help of JΛ̊KE I was able find the matches but I can't find a way to wrap them. How Can I achieve this please.

My code looks like below

  1. $(document).each(function() {
  2.     var pMatch = $('.one li').map(function(){
  3.         return $(this).text()
  4.     })
  5. var sMatch = $('.two li').map(function() {
  6.         return $(this).text()
  7.     })
  8. $.each(pMatch,function(i,h) {
  9.    
  10.     if (h===sMatch[i])
  11.         
  12.     $('.show-here').text('This is Working');
  13.    
  14.     else    
  15.          
  16.     $('.show-here').text('This is not Working');
  17. });
  18.    
  19.    
  20.    
  21. });


Link to jsFiddle