HTML:
<div id ="split"><p>hi one two three</p><img class ="some class" src="some src" master_src="src" master_w="318" master_h=22"><img class="some" src="src"><h1> 4 5 6</h1></div>
Desired output:
<p>hi one two three</p>
""
<h1>4 5 6</h1>
How can i get this output ? I wanted a general form if there can be n images inside a div.
$("#split").find('img').each(function(index){
alert($(this).splitsuchthat())
// for first time it should be <p>hi one two three</p>
// secon time ""
// third time <h1> 4 5 6</h1>
});
.*?<\/p>` would match the paragraph tag.
– Avinash Raj Jul 25 '14 at 15:55