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
jQuery and Borders
Moderator: General Moderators
Re: jQuery and Borders
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
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.
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.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.