$(elem).replaceWith('<div id="fs-img">' + $(this).find('a[onclick*="return hs.expand(this)"] img') + '</div>'); 

The code returns an Object object - how to combine everything in the framework of replaceWith without additional lines of initial assignment and subsequent embedding in the tag?

  • Unclear. What do you want to do? - Stepan Kasyanenko

0