Infobox table cleaner

by timmah

HTML

<p>Sections of this document provide specific information on the clinical evidence requirements for the following types of devices:</p>
<ul>
	<li>Total and partial joint prostheses</li>
	<li>Cardiovascular devices to promote patency or functional flow</li>
	<li>Implantable pulse generators</li>
	<li>Heart valve prostheses</li>
	<li>Supportive devices - meshes, patches and tissue adhesives</li>
	<li>There is also a specific section (<a href="#implantable-devices-magnetic-resonance-environment">Section 10</a>) on implantable medical devices in the magnetic resonance environment.</li>
</ul>
<p>The TGA has developed this document in conjunction with the Royal Australasian College of Surgeons Australian Safety and Efficacy Register of New Interventional Procedures - Surgical (ASERNIP-S) to supplement guidance on medical device regulatory requirements in the <a href="https://www.tga.gov.au/publication/australian-regulatory-guidelines-medical-devices-argmd">Australian Regulatory Guidelines for Medical Devices</a> (ARGMD) <u>2</u> .</p>
<p>These guidelines have been developed taking into account requirements of the Therapeutic Goods Act 1989 and the Therapeutic Goods (Medical Devices) Regulations 2002. They reference and align with international guidance documents including those of the Global Harmonization Task Force (GHTF) and the European Commission 'MEDDEVs' which are also based on the GHTF guidelines. The GHTF no longer exists, and has been permanently replaced by the International Medical Device Regulators Forum (IMDRF).</p>
<table>
	<tbody>
		<tr>
			<td><p><img border="0" width="51" height="51" src="../../../../../../../web team/code cleaner/clip_image002_0002.gif" alt="Information"></p></td>
			<td><p><strong>Disclaimer</strong></p>
				<ul>
					<li>The literature search method used by ASERNIP-S to collect and collate the information referenced in this guidance is described in <a href="#appendix-3-source-material">Appendix 3</a>. This is subject to the...

JavaScript

// Replaces single cell tables containing information icons with a clean div and class

$('table').each(function() {
	var $this = $(this);
    
	// Target img tags with specific alt text
	if ($(this).find('img').attr('alt') == 'Information') {

		// Grab the HTML from the desired table cell
		var $content = $(this).find('td:last').html();
		
		// Add the content in the desired HTML wrapper and place OUTSIDE the original table
		$this.after('<div class="infobox">' + $content + "</div>");
		
		console.log('Infobox table cleaned');
		
		// Remove said table
		$this.remove();	
    }	
});