The generic idea is following:
You have div with first image and then you have big number of divs with second image, you spawn them adjusting css properties
Each second image div is just a small piece of it with adjusted background, so it overlays previous image, part of it
With this method you can spawn pieces in any order you want with any effect you want.
Slide them in, fade them im, randomally fill, anything
Html will look like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js" type="text/javascript"></script>
<style type="text/css">
.first{
height:500px;
width:500px;
position: absolute;
background:url(1.jpg);
z-index: 2;
}
.second_part1{
height:50px;
width:50px;
position: absolute;
background:url(2.jpg) 0 0;
z-index: 2;
}
.second_part2{
height:50px;
width:50px;
position: absolute;
background:url(2.jpg) -50px 0;
left:50px;
z-index: 2
}
.second_part3{
height:50px;
width:50px;
position: absolute;
background:url(2.jpg) -200px -150px ;
left:200px;;
top:150px;
z-index: 2
}
</style>
</head>
<body>
<div class="first">
</div>
<div class="second_part1">
</div>
<div class="second_part2">
</div>
<div class="second_part3">
</div>
</body>
</html>
And you also can have another image2 div, which will be shown up after you have loaded all pieces. And destroy all pieces after you show it up
There are plenty of ways to impement whole proccess on javascript
As for me first of all make array of pieces(array of divs) and then you can create any number of effects you want, just by displaying them with different effects and different order
I do not know if nivo uses this way or some other, but this works :)