<div id="fixed-2" class="fixed"></div>
<div id="forceScroll"></div>
<div id="marker"></div>
+ <p class="instructions">Click the white box to move the marker to it.</p>
</body>
</html>
\ No newline at end of file
</div>
<div id="forceScroll"></div>
<div id="marker"></div>
- <p class="instructions">Click the white box to move the marker to it. Clicking the box also changes the position to absolute (if not already) and sets the position according to the position method.</p>
+ <p class="instructions">Click the white box to move the marker to it.</p>
</body>
</html>
\ No newline at end of file
$(function() {
$('.static').click(function() {
$('#marker').css( $(this).offset() );
+ var pos = $(this).position();
+ $(this).css({ position: 'absolute', top: pos.top, left: pos.left });
return false;
});
});
</tbody>
</table>
<div id="marker"></div>
- <p class="instructions">Click the white box to move the marker to it. Clicking the box also changes the position to absolute (if not already) and sets the position according to the position method.</p>
+ <p class="instructions">Click the white box to move the marker to it.</p>
</body>
</html>
\ No newline at end of file