Search code examples
moovwebtritium

How to move picture to another div in tririum


If I have something like this:

<div class="class1">
    <img src="image.jpg" id="image1">
</div>

How do I move this image to another div in tritium?


Solution

  • I think this should work, try it out (class2 is the id of the class to what you want to move the image):

    $("//div[contains(@class,'class2')]") {
      move_here("//img[@id='image1']")
    }
    

    There might be other ways but this is quite simple and working.