background preloader

jQuery custom content scroller

jQuery custom content scroller
Last updated on Mar 10, 2015 Originally published on August 1, 2010 by malihu, under Plugins. Highly customizable custom scrollbar jQuery plugin. Features include vertical and/or horizontal scrollbar(s), adjustable scrolling momentum, mouse-wheel (via jQuery mousewheel plugin), keyboard and touch support, ready-to-use themes and customization via CSS, RTL direction support, option parameters for full control of scrollbar functionality, methods for triggering actions like scroll-to, update, destroy etc., user-defined callbacks and more. Current version 3.0.8 (Changelog)Upgrading from version 2 When upgrading from version 2.x to 3.x it’s important to use version 3 CSS and .png files. Version 2 is still maintained and updated here. How to use it Get started by downloading the archive which contains the plugin files (and a large amount of HTML demos and examples). Include jquery.mCustomScrollbar.css in the head tag your HTML document (more info) Initialization Initialize via javascript more info

jQuery Masonry Tiny Scrollbar: A lightweight jQuery plugin Nonsense The chart shows how much lessons young people took in sports during 1999 sorted by sport and gender. The most popular sport for boys was football with 67 lessons. The diagram shows the evolution of the horse over a period of 40 million years. The table shows where students got there money from over a ten year period in the United Kingdom. These days sporting champions are more motivated by fame and money. The diagram shows the process of how to do a research.

Shadowbox.js Adobe ActionScript 3.0 * Capturing mouse input Mouse clicks create mouse events that can be used to trigger interactive functionality. You can add an event listener to the Stage to listen for mouse events that occur anywhere within the SWF file. You can also add event listeners to objects on the Stage that inherit from InteractiveObject (for example, Sprite or MovieClip); these listeners are triggered when the object is clicked. As with keyboard events, mouse events bubble. In the following example, because square is a child of the Stage, the event dispatches both from the sprite square as well as from the Stage object when the square is clicked: In the previous example, notice that the mouse event contains positional information about the click. The MouseEvent object also contains altKey, ctrlKey, and shiftKey Boolean properties. Creating drag-and-drop functionality For more details, see the section on creating drag and drop interaction in Changing position. Customizing the mouse cursor Customizing the context menu Managing focus

Unheap - A tidy repository of jQuery plugins CSS Sprites: What They Are, Why They're Cool, and How To Use Them By Chris Coyier On This article has been revised and re-written several times since its very first publication in 2007, to keep the information current. The most recent revision was done by Flip Stewart in January 2015. #What are CSS Sprites? Spoiler alert: they aren't fairies that write your stylesheets for you. To summarize: the term "sprites" comes from a technique in computer graphics, most often used in video games. CSS Sprites is pretty much the exact same theory: get the image once, and shift it around and only display parts of it. #Why use CSS Sprites? It may seem counterintuitive to cram smaller images into a larger image. Let's look at some numbers on an actual example: That adds up to a total of 14.38KB to load the three images. While the total image size (sometimes) goes up with sprites, several images are loaded with a single HTTP request. Thus, sprites are important for the same reasons that minifying and concatinating CSS and JavaScript are important. $ npm install sprity -g

scrollorama Disclaimer: This is an experimental, just-for-fun sort of project and hasn’t been thoroughly tested. Design and build your site, dividing your content into blocks. Embed scrollorama.js after jQuery and initialize the plugin, passing the blocks class selector as a parameter. Target an element and animate its properties. The animation parameters you can use are: Hook into the onBlockChange event. scrollorama.onBlockChange(function() { alert('You just scrolled to block#'+scrollorama.blockIndex); }); Note: If you are not using the pinning feature, it is recommended you disable it.

Who needs 'em anyway? scrolldeck.js Build a web page with each slide as a div. Pro-Tip: Use rem’s to make content scale (resize this window to see) Create section navigation by linking to slide id’s (optional) After linking all the required scripts (jQuery, Scrollorama, scrollTo, easing & scrolldeck), create the slide deck on document ready event. $(document).ready(function() { var deck = new $.scrolldeck(); }); You can configure the settings as follows(example has the default config values assigned) Add animations to slides by adding the "animate-in" or "animate-build" classes to elements in your slides. <div class="slide"><p class="animate-in" data-animation="fly-in-left">This paragraph will fly in from the left. Available animations are "fly-in-left", "fly-in-right", "space-in" and the default which is "fade-in"

Limit Your DIVS | That Css Guy! During the years of honing my HTML skills I have been tempted and often required to serve up the cleanest code I possibly can. I quickly learned that all elements within my document – everything from a <p> to a <ul> to a <h5>– can accept the same style rules as a div. This got me thinking, why even use a div for styling when you can apply the style directly to your elements? I started to explore this concept further and over time noticed one repeating outcome when limiting my div use: consistent cross browser rendering! When I limited the use of my divs all the major browser including both IE6 and IE7 would render the sites nearly perfectly. So, this obviously brings me to the point of this article, what if you build a site without any divs at all? It’s possible and I’ve done it- not that it’s magic but proves divs nor tables are necessary for layout www.nodivs.com is a proof of concept site that I’ve put together to show how a typical website can be built without divs. No div Contact Box

Nikebetterworld Parallax Effect Demo | Ian Lunn A couple of months ago, I created a jQuery Vertical Parallax Demo that manipulated CSS to make multiple backgrounds move at different speeds relative to the users movement of the scroll bar. This type of effect is slowly appearing across various websites on the web, achieved using many different techniques. Nikebetterworld took the idea to a new level. In today’s tutorial, we’re going to take the original jQuery Parallax script I wrote and recreate a webpage similar to Nikebetterworld. If you’d like to see what we’ll be creating, go check out the demo or download the files. The HTML Our page will consist of 6 sections: header, footer and 4 articles. To start, at the top of the page, we’ll reference all of the JavaScript files we’ll use to make the effect work. We also need to initiate the localScroll function on the unordered list of article links that are fixed to the right of the page. Inside of our body tag, we begin with the unordered list that provides a quick link to each section.

Related: