Page 1 of 1

jQuery and Borders

Posted: Fri Oct 30, 2009 10:10 pm
by volomike
Anyone here ever tried with jQuery to get graphics to appear in the borders of the viewport, that stay there even when scrolling? For instance, some special effects:

- Fall leaves in the margins
- animated snow that is set to fall only on the left and right margins so many pixels in
- an animated Santa and sleigh that comes into a page from the right and leaves on the left

Re: jQuery and Borders

Posted: Sat Oct 31, 2009 5:18 am
by it2051229
With jQuery i'm not sure but i think it is possible with javascript... I mean saw a mario game made purely in javascript with all those animation and stuff...

Re: jQuery and Borders

Posted: Mon Nov 02, 2009 11:08 am
by pickle
1) & 2) You could do this by setting the leaves to the background of the page, then using jQuery to animate the background

Look into the CSS positions "static" and/or "fixed" - I think "fixed". I forget exactly which one does it, but one of them makes the element stick to the window, not the DOM.