Creating a Swipeable Side Menu for the Web

Today, I will be sharing an experiment to replicate the behavior of the side menu, similar to what you’ve seen on smartphone applications, but this tutorial is for the web. I will take you through each step from structuring your layout and adding swipe gestures to open/close the menu, usable on both desktop and smartphones.

Creating a Swipeable Side Menu for the Web

vía Creating a Swipeable Side Menu for the Web.

Mobiscroll – The customizable HTML5 spinner control for touch devices like smartphones and tablets

Mobiscroll - The customizable HTML5 spinner control for touch devices like smartphones and tablets

Smartphone & Tablet optimized UI
Make your mobile users lives easier.

Lightweight footprint
With the Custom download builder include only what you need.Nothing more, nothing less.

Easily Adjustable
Customize it to your needs and use for a wide variety of things.

Not JUST a Date & Time Picker
Render HTML SELECT Elements
Work With Images
Use Pre-built Presets

Supported on iOS, Android, BlackBerry and every major Mobile and Desktop browser.

Mobiscroll – The customizable HTML5 spinner control for touch devices like smartphones and tablets.

jQuery MagicLine Navigation | CSS-Tricks

These “sliding” style navigation bars have been around a while, I just thought I’d take a crack at doing it myself as the opportunity came up recently. Turns out it’s really pretty darn easy. I put two examples together for it.

jQuery MagicLine Navigation

The Idea

The idea is to have a highlight of some kind a background or an underline follow you around as you mouse over the different links in the navigation. This will happen with jQuery and it’s animation abilities. As such, the “magic line” will only be appended via JavaScript. Once added to the list and styled, as you mouse over the different links, it figures out the left positioning and the width and animates to match.

vía jQuery MagicLine Navigation | CSS-Tricks.

Other tutorials:
Pure CSS3 LavaLamp Menu – Script Tutorials

8 Useful jQuery Snippets For URL’s & Querystrings « Design Chemical – jQuery, WordPress, Tutorials & Plugins

In any web project you will inevitably come across a situation where being able to extract information or use the current page URL would be useful. If server-side code is not available to help we can use javascript to get this information.

The following are examples of useful code snippets that can be used – some of the examples use standard javascript functions and are not specific to jQuery:


// 1- Retrieve current URL
var url = document.URL;


// 2- Retrieve root URL
var root = location.protocol + '//' + location.host;


// 3- Get # parameter
var param = document.URL.split('#')[1];


// 4- update browser address bar URL
$('a.demo-link').click(function(){
var hash = $(this).attr('href');
location.hash = hash;
});


// 5- Redirect - insert required URL
window.location.href = "http://designchemical.com/";


// 6- Get Querystring Parameters
var vars = [], hash;
var q = document.URL.split('?')[1];
if(q != undefined){
q = q.split('&');
for(var i = 0; i < q.length; i++){
hash = q[i].split('=');
vars.push(hash[1]);
vars[hash[0]] = hash[1];
}
}
// To use -- Will alert the value of parameter a
alert(vars['a']);


// 7- Highlight Current Menu Item
var url = document.URL;
$('#menu a[href="'+url+'"]').addClass('active');


// 8- Check If Link Contains External URL
var root = location.protocol + '//' + location.host;
$('a').not(':contains(root)').click(function(){
this.target = "_blank";
});

vía 8 Useful jQuery Snippets For URL’s & Querystrings « Design Chemical – jQuery, WordPress, Tutorials & Plugins.

jQuery contextMenu Plugin

The jQuery contextMenu Plugin was designed for web applications in need of menus on a possibly large amount of objects. Unlike implementations as a beautiful site’s or trendskitchens’ this contextMenu treats the menu as the primary object. That means, that a single menu is defined that can be used by multiple objects. Unlike the mentioned plugins, contextMenu doesn’t need to bind itself to triggering objects. This allows injecting and removing triggers without having to re-initialize or update contextMenu.

vía jQuery contextMenu Plugin. <- A Beautiful site

Other resource:

ContextMenu is a lightweight jQuery plugin that lets you selectively override the browser’s right-click menu with a custom one of your own.

It is worth noting that by overriding the browser’s right click menu this plugin provides a behaviour that is different from what most users will expect. This plugin may be best suited for intranet web applications, where the developer is working in a more controlled environment.

vía: ContextMenu plugin

 

jPlayer : HTML5 Audio & Video for jQuery

jPlayer

jPlayeris the completely free and (GPL/MIT) media library written in JavaScript. A jQuery plugin, jPlayer allows you to rapidly weave cross platform audio and video into your web pages. jPlayer’s comprehensive API allows you to create innovative media solutions while support and encouragement is provided by jPlayer’s active and growing community.

vía jPlayer : HTML5 Audio & Video for jQuery.