background preloader

Smooth Vertical or Horizontal Page Scrolling with jQuery

Smooth Vertical or Horizontal Page Scrolling with jQuery
In this tutorial we will create a simple smooth scrolling effect with jQuery. We will create a horizontal and a vertical website layout to show the effect. We will be using the jQuery Easing Plugin and just a few lines of jQuery. So, let’s start! The Markup The markup for our example […] View demoDownload source In this tutorial we will create a simple smooth scrolling effect with jQuery. So, let’s start! The Markup The markup for our example page is going to be very plain. The HTML is going to be the same for both examples. The CSS Since we have two examples, we will start with the horizontal page style. The main idea is to make the sections very wide and 100% in height. We need to give the body a valid height, because we want to be able to define the height 100% to the section. The style for the vertical page layout is going to look as follows: Nothing special here, just that we give a big height to the sections. Let’s add the JavaScript The JavaScript Related:  Site BulidingjQuery

Adaptor, an extensible jQuery content slider | Phil Parsons This jQuery plugin is a free and lightweight content slider for creating cool 3D (and 2D) slideshows for featured content on your website. In older browsers that do not support CSS3 with 3D transitions the plugin detects them and degrades gracefully to a simple transition maintaining the rich user experience for everyone. The plugin is powered by jQuery and CSS and is designed to be easy to add to an existing web page with the minimal effort on the designer or developer’s part. If you are a developer and want to spice things up a bit the plugin exposes a simple API for adding animation effects and extending it’s core functionality with paging controls and feedback indicators. The full developer documentation for the plugin can be found on the Github project pages —the same place you can download the latest version of the code. Setting up the HTML For 3D effects the HTML will need an outer box within which the animated box will rotate—I call this the view port. Including the jQuery

10 jQuery Horizonal Scroll Demos & Plugins In today’s post we bring to you 10 jQuery Horizonal Scroll Demos & Plugins useful for those who see things horizontally. I guess we have to accept some people scroll both ways! :) 1. In this tutorial we will create a simple smooth scrolling effect with jQuery. SourceDemo 2. To get horizontal scrolling the Mouse Wheel Plugin by Brandon Aaron (GitHub, Download) will be used to detect mouse wheel movements like a keypress and of course, jQuery itself will be used. SourceDemo 3. Supporting the mouse wheel can add further interactivity to your HTML5 web pages. SourceDemo 4. In this tutorial we will create a simple smooth horizontal content scrolling effect with just a few lines of jQuery without using any plugin. SourceDemo 5. jQuery Horizontal automatic Scrollbars with mouse We all know that horizontal scrollbars are hideous. SourceDemo 6. jQuery mousewheel easing horizontal scrolling Learn how to create jQuery mousewheel easing horizontal scrolling in this tutorial. SourceDemo 7. simplyScroll v2 8.

jQuery – Effet smooth scroll (défilement fluide) - Tutoriels Cet article a 3 années. Il commence à dater, lisez-le donc en gardant son âge en tête ! Merci publié le Lu 110 465 fois. L’effet de scroll fluide est déjà intégré, en fonction de vos paramètres utilisateur, sur certains navigateurs. Il y a quelques temps de cela (peut-être trois ans maintenant) j’avais trouvé un script JS pour ajouter cet effet, mais celui-ci ne prenait en compte que les ancres dotées de l’attribut name, sous cette forme : <a href="#cible">Aller à "cible"</a> <a name="cible"></a> Or la création d’un élément anchor dans le seul but de créer une ancre ne me semblait pas la méthode la plus propre, mais comme j’étais une quiche en JavaScript (ça n’a pas trop changé d’ailleurs, puisque j’utilise principalement jQuery pour me faciliter l’existence), j’ai fait avec ce code jusqu’à ce que je découvre jQuery et le plugin jQuery.scrollTo(). C’est pourquoi aujourd’hui je vous propose de créer votre propre script jQuery de smoothscroll. Solution de base Voyons le code de plus près :

jQuery.ScrollTo Notice I've pretty much stopped updating this blog, but the plugin development is still on-going. You can find the link to the Github project page at the bottom of the article. Introduction An article about animated scrolling with jQuery inspired me to make a small, customizable plugin for scrolling elements, or the window itself. How to specify what to scroll ? Simple, all the matched elements will be scrolled, for example: $('div.pane').scrollTo(); If you need to scroll the window (screen), then use: $.scrollTo(); How to specify where ? Settings Getting the real scrollable element out of a node In order to find the real element whose attributes will be animated, you need to call $.fn. $(window). Manually finding the scrolling limit ScrollTo always had an internal function that calculates the scrolling limit for both axes. Overloading This plugin accepts the arguments in two ways, like $.animate(). $().scrollTo( , , ); $().scrollTo( , ); In this second case, you can specify the duration in the hash.

CSS Font-Size: em vs. px vs. pt vs. percent / Kyle Schaeffer One of the most confusing aspects of CSS styling is the application of the font-size attribute for text scaling. In CSS, you’re given four different units by which you can measure the size of text as it’s displayed in the web browser. Which of these four units is best suited for the web? Meet the Units “Ems” (em): The “em” is a scalable unit that is used in web document media. So, What’s the Difference? It’s easy to understand the difference between font-size units when you see them in action. As you can see, both the em and percent units get larger as the base font-size increases, but pixels and points do not. Em vs. We’ve decided that point and pixel units are not necessarily best suited for web documents, which leaves us with the em and percent units. When the client’s browser text size is set to “medium,” there is no difference between ems and percent. The Verdict The winner: percent (%). Addendum (January 2011)

Animated Scrolling with jQuery 1.2 A few weeks ago I wrote about how to use jQuery and a couple modules from the Interface plugin suite to automatically have same-page links scroll to their target location when clicked (Animated Scrolling for Same-Page Links). Well, now that jQuery 1.2 is out, and I've successfully upgraded this site to it without a hitch, we can do the same thing with jQuery core alone. Here is what the code looks like with the minor change: JavaScript: $(document).ready(function(){ $('a[href*=#]').click(function(){ if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { var $target = $(this.hash); $target = $target.length && $target || $('[name='+this.hash.slice(1)+']'); if ($target.length) {var targetOffset = $target.offset().top; $('html,body') return false; } } });}); Not a bad little adjustment when you consider that we're able to get rid of a plugin dependency. var targetOffset = $target.offset().top; Ease on down the page Update

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"

|| Generador de texto simulado | Lorem ipsum para diseñadores de páginas web || jPages - Pagination jQuery What does it do? jPages is a client-side pagination plugin but it gives you a lot more features comparing to most of the other plugins for this purpose, such as auto page turn, key and scroll browse, showing items with delay, completely customizable navigation panel and also integration with Animate.css and Lazy Load. Apart from all its features, the main diference for the other pagination plugins is that with jPages you can create as many navigation panels as you want and you can choose exactly where to place them. The plugin is very unobtrusive and it won't apply any extra styles to the items you are paginating. It will only create and insert the links inside the element(s) you are applying the plugin to, in order to turn them into navigation panel(s). Compatible with All Browsers and IE7+ How to Add the following code to the <head> section of your page (correct file locations first): In case you want to use Animate.css animations you will also need to add the file: Example source code:

Related: