0

I am using simple_html_dom to get url content, some image won't show,

<div class="js-delayed-image-load" data-alt="image_title"     data-src="image_url" data-width="976" data-height="732"></div> 

how can I filter the specific div to convert div to img and data-src to src. like

<img class="js-delayed-image-load" alt="image_title"     src="image_url" data-width="976" height="732"></img>
  • Is there any specific reason that you can't use the `` tag from the beginning? Are you looking for a pure JavaScript solution, or is a library like jQuery permissible in this case? – c1phr Sep 02 '15 at 22:13
  • possible duplicate of [jQuery/javascript replace tag type](http://stackoverflow.com/questions/2815683/jquery-javascript-replace-tag-type) – falinsky Sep 03 '15 at 14:16

0 Answers0