In-Field Labels jQuery Plugin. Fixed Floating Elements. Watch Watch jQuery Fixed Floating Elements screencast (Alternative flash version) QuickTime version is approximately 45Mb, flash version is streaming. View the demo used in the screencast Understanding the effect When I scrolled down the Apple store when I had something in my basket I found that the summary and what I had selected would follow me down the page.
I’ve seen this effect before, but often it would be a little jumpy and the element would have to catch up with the scrolling. Apple’s version was very smooth and didn’t jump when I kept scrolling. Upon firing up Firebug I can see that once the scrollbar gets to the point where the basket is at the top of the page, the basket has a class applied to it which gives it a position: fixed – which explains why it holds still while I continue to scroll down. Other ways to do it Like I said, I’ve seen this effect before, for example on Simon Willison’s web site (see the comments form) (one of the speakers for my Full Frontal conference). jQuery.
jQuery Masonry ? David DeSandro. Columnize. Smart Columns w/ CSS & jQuery | jQuery Tutorials. Gradient. Element gradient. Quick Tip: Different Layouts for Different Widths. CSS3 animations and their jQuery equivalents. Below, you'll find two columns. The left column shows five kind of CSS3 animations, the right column shows the same kind of animations, but done with jQuery. Hover the elements (or click in the accordion) to activate the animation. Click on the "Gear" icon to view the code behind it. Please note that the CSS3 animation examples only work on webkit based browsers. For the time being, this simply means the latest versions of Apple Safari and Google Chrome. Fade Bounce Pulsate and Colorize Link nudge Accordion First accordion Lorem ipsum dolor sit amet, consectetur adipiscing elit. Second accordion Third accordion jQuery. Connaître la position d'un élément. Etendre les possibilités de jQuery afin de connaître les coordonnées X et Y d’une balise HTML.
Par défaut jquery ne permet pas de connaître la position d’un élément. Ce qui est parfois gênant, lorsque, par exemple, on veut positionner un élément vis à vis d’un autre tel que des tooltips [1] Utiliser les fonctions natives de javascript En cherchant sur le net, nous trouvons assez rapidement ceci : Comme vous pouvez le constater pas une once de jQuery, et pourtant ce code est issu d’un script [2] utilisant pleinement jQuery. Si dans ce code on n’en trouve pas, c’est dû au fait que les méthodes offsetLeft, offsetTop, … sont des méthodes DOM propres à javascript. Ces méthodes ne sont pas accessibles directement par jQuery.
Etendre jQuery Pour remédier à cela, il existe 2 fonction jQuery intéressantes : $().get(val) jQuery.fn.extend() get() retourne un tableau d’objets DOM associés à l’objet jquery spécifié. Get La fonction Get() retourne les éléments DOM à partir de jQuery. Extend() Remarques. Box Shadow.