background preloader

JS

Facebook Twitter

Snap.svg - Home. Internet explorer 8 - How do you use mobile-first with in IE8. iOS style sliding menu. Adaptive Images in HTML. The classList API. I have to be honest with you: I feel like a fraud writing about JavaScript for HTML5 Doctor.

The classList API

I would feel like a fraud writing about JavaScript for a click-driven ad-splattered content farm, never mind HTML5 Doctor. The thing is though, I’m writing about the classList API, and it’s super easy. If your JavaScript-fu isn’t great and you’re wary of HTML5 APIs, this one is at the perfect temperature for toe-dipping, and it’ll leave you pleasantly surprised at just how easy it is. The classList API is a “does exactly what it says on the tin” API. It gets a list of the classes on an HTML element and uses JavaScript to manipulate it. Before this nugget of HTML5 came along, working with classes was a royal pain, but what was once a twisty overgrown cowpath with wolves lurking in thickets is now a bright sunlit path fit for rollerskating. Getting the classList # Getting the classList is a simple matter of element.classList, like so: <p id="bad-joke" class="oh my giddy aunt">Two dogs are in the park. Jakiestfu/Snap.js.

Jump Start: GSAP JS. You may use the code at no charge in commercial or non-commercial apps, web sites, games, components, and other software as long as end users are not charged a fee of any kind to use your product or gain access to any part of it.

Jump Start: GSAP JS

If your client pays you a one-time fee to create the site/product, that's perfectly fine and qualifies under the "no charge" license. If end users are charged a usage/access/license fee, please sign up for a "Business Green" Club GreenSock membership which comes with a comprehensive commercial license. See for details. Use at your own risk. No warranties are offered. This is a legal agreement between you (either an individual or a single entity) and GreenSock, Inc. I.

II. B. C. III. B. IV. Hash slider by manjographics. This jquery-based slider does what the most jquery-sliders do, but adds a hashtag to the window location, so you can link to any content / position of the slider.

hash slider by manjographics

I was searching for a script like this for a while but didn't find one and so a decided to make one myself. For example: will set the slider to its 3th position easy to implement full styleable via css mouse wheel integration direct links to slider postion via hash tag automatic generated number navigation content could be everything free for everyone only 2,2kb in size minified script download and css download rar-package with the script, the css and a example integration download Grab the latest version of jquery and download and integrate the hashslider.js and the hashslider.css (also the mousewheel plugin if you wish) use following HTML code and then make your adjustments in css. Fade Out between pages - CSS-Tricks Forums. # March 4, 2011 at 7:47 pm By the way, if you are wanting to fade pages IN as well, you’ll want to set the body’s display:none in the jquery and fadeIn()..

Fade Out between pages - CSS-Tricks Forums

Holla $(document).ready(function() { $('body').css('display', 'none'); $('body').fadeIn(1000); $('.link').click(function() { event.preventDefault(); newLocation = this.href; $('body').fadeOut(1000, newpage); }); function newpage() { window.location = newLocation; } }); What this does is sets the body to not display, then fades it in. Then once you click a link which you have deemed worthy of making the page fade out, it first prevents the default, which is instantly going to that link, and sets the variable new Location to be the href attribute of the currently clicked link.

Try that puppy out. Sorry I have a bit too much fun when it comes to js/jquery, I’m still learning myself so it’s a learning experience for both of us! Load HTML page dynamically into div with jQuery.

jQuery

RequireJS. Responsive Div to scrolling.