Here the div's which i used to show 2 pop up's depending on the below mentioned ajax method reponse,

```
 <a href="#flash" data-rel="popup" data-position-to="window" class="auto-pop" data-transition="none"></a>
 <div data-role="popup" id="flash" data-overlay-theme="a" data-theme="c" data-dismissible="false" class="ui-content" class="dc">
 <center><img src="images/spin.gif" width="250" height="268" /></center>
 <p class="dc"><strong>Congratulations you have achieved <span class="percentage_value"> </span>% of the readings!</strong></p>
 </div>

 <a href="#achievflash" data-rel="popup" data-position-to="window" class="auto-pop1" data-transition="none"></a>
 <div data-role="popup" id="achievflash" data-overlay-theme="a" data-theme="c" class="ui-content" class="dc">
 <p class="dc"><strong>This is a free app.</p><p> Please<a href="https://www.google.com" target="_blank" data-role="button" data-inline="true" data-theme="b">DONATE</a> for us.
 </strong></p>

 if(achieve.flag == 1) {
    setTimeout(function(){
     $('.percentage_value').text(achieve_value); $('#flash').show();
     $('#flash-screen').show();
     $('a.auto-pop').trigger('click');
     $('#flash').delay(4000).fadeOut(1000);
     $('#flash-screen').delay(4000).fadeOut(1000);
    },100);
    }//flag if
if(donation.flag == 1) {
    setTimeout(function(){
     $('#achievflash').show();
     $('#achievflash-screen').show();
     $('a.auto-pop1').trigger('click');
    },6000);
}

```

I have around 100 different html files ,each contains the same above div.I want to make the div as in one js and call it as method.Please help me to resolve how i can acheive this