background preloader

jQuery Countdown

jQuery Countdown
The countdown functionality can easily be added to a division with appropriate default settings, although you do need to set the target time. You can also remove the countdown widget if it is no longer required. Default countdown: 331Days6Hours34Minutes12Seconds The defaults are: Text is in English Format is 'dHMS' Days are shown if needed Hours/minutes/seconds are shown You can override the defaults globally as shown below: Processed fields are marked with a class of hasCountdown and are not re-processed if targetted a second time. A note on Date - the JavaScript Date constructor expects the year, month, and day as parameters. You can control how the countdown is presented via the format setting. Don't show days: 119Hours59Minutes58Seconds Don't show seconds: 5Days0Hours0Minutes Don't show either: 120Hours0Minutes Pad with zeroes: 04Days23Hours59Minutes58Seconds Compact version: 4d 23:59:58 Minimal compact version: 120:00 For targets further in the future, there are more presentation options. <?

50 jQuery Plugins for Form Functionality, Validation, Security and Customisation Lets be honest, forms can be a pain in the ass to fill in. And for developers? There an even bigger pain in the ass to build. No one really likes them, as such, the most difficult challenges that a developer has to take on, when it comes to forms, is not only how to build a form that is easy and quick for the user to use, but also make it as accessible and usable as possible. Its not easy. In this article we have collected 50 jQuery plugins to help you build powerful forms. Form Functionality Plugins Elastic – Make your textareas grow This jQuery plugin makes your textareas grow and shrink to fit it’s content. jQuery “Highlight” Plugin Highlight increases usability of forms by highlighting the elements as you interact with the page. Autotab: jQuery Auto-Tabbing and Filtering Autotab is a jQuery plugin that provides auto-tabbing and filtering on text fields in a form. Ajax Fancy Captcha jQuery NobleCount Password Strength Indicator and Generator FormToWizard Plugin ToggleVal jQuery AlphaNumeric

How to detect if a font is installed (only using JavaScript) In the pursuit of an idea I had recently, one tiny feature of the web site would be to detect whether the user had X font installed. I’ve looked at flash solutions, since a SWF had access to enumerate the fonts, but ultimately if it could be done without flash, it would/should be faster and smarter. So here’s my pure JavaScript (okay, and a little CSS) solution: font.js Usage Include the font.js script in your page. It relies on jQuery so include that somewhere too. $(document).ready(function () { font.setup(); // run setup when the DOM is ready}); Then to test: font.isInstalled(fontname); // returns true or false Simple. Example I mention this little idea, and a fuller blog post on this later, but I’ve installed it and make use of it to preview a font-family list: How It Works Comic Sans to the Rescue For the first time in my career I’ve found a genuine use for Comic Sans. Basic Matching Tricks The key to a successful match are two tricks:

The Final Countdown - jQuery.countdown Take control of your DOM, register yours callbacks and start counting! The Final Countdown is a plugin tailored to be used in any layout, without any CSS/HTML dependency. The goal was to fit and mimic differents countdown styles as you see out there in coupons and auction sites. There are few ways to get started, the simplest example is as shown here, but we support many different countdown styles. Read our Documentation and follow our Examples to see what suits your particular needs. Features Comprehensive documentation; Bult-in time formatter; Zero-pad support to all variables; Pluralization support; i18n aware; HTML and CSS agnostic; Support since 2011. 30 Fantastic New jQuery Plugins With jQuery now being used in over 40% of all web sites, the demand for up-to-date and feature-rich plugins has never been greater. Thankfully, the community has always met its popularity head on by offering a constant influx of new jQuery plugins that constantly push the boundaries of functionality even-further. We haven’t actually had a good look at plugins in quite a while, so today, we thought we would bring you up-to-date with some of the latest and greatest. CodeExplorer CodeExplorer is an enitrely unique code formatting plugin that will not only format the code with colors and spacing, but will also display it in an entire folder structure. Subway Map Visualization Plugin The amazing Subway Map Visualization plugin allows you create, interactive subway map visualizations with HTML. Website Tour with jQuery Website Tour with jQuery allows you to, as its name clearly states, create a tour on a website with jQuery. jQuery Embedded Help System Flurid – The Fluid CSS Grid Isotope MobilyMap

SimpleModal / Eric Martin / Overview SimpleModal is a lightweight jQuery Plugin which provides a powerful interface for modal dialog development. Think of it as a modal dialog framework. SimpleModal gives you the flexibility to build whatever you can envision, while shielding you from related cross-browser issues inherent with UI development. Usage SimpleModal provides 2 simple ways to invoke a modal dialog. As a chained jQuery function, you can call the modal() function on a jQuery element and a modal dialog will be displayed using the contents of that element. $("#element-id").modal(); As a stand-alone function, a modal dialog can be created by passing a jQuery object, a DOM element, or a plain string (which can contain HTML). $.modal("<div><h1>SimpleModal</h1></div>"); Both of the methods described above, also accept an optional options object (nice tongue-twister, huh?). $("#element-id").modal({options}); $.modal("<div><h1>SimpleModal</h1></div>", {options}); Styling For IE6, you might want to apply the PNG fix: Demos

Making a jQuery Countdown Timer Martin Angelov When building a coming soon or event page, you find yourself in search for a good way to display the remaining time. A countdown gives the feel of urgency, and combined with an email field will yield more signups for your newsletter. Today we are going to build a neat jQuery plugin for displaying a countdown timer. Let’s start with the markup! The HTML We will give the plugin the creative name of “countdown”. Generated markup In the above example, the plugin has been originally called on a div with an id of countdown. Inside is the markup for the digits. The static class of the digits gives them their gradient background and box-shadow. A jQuery Countdown Timer The .countDiv spans are the dividers between the units. But how is this markup generated exactly? The jQuery First let’s write two helper functions used by the plugin: init generates the markup you saw above;switchDigit takes a .position span and animates the digits inside it; assets/countdown/jquery.countdown.js Great!

Sort &amp; Vote – A jQuery Poll Martin Angelov Today we are going to make a draggable sort & vote poll, that will enable our website visitors to choose their favorite tutorial from the site. After they vote, a friendly CSS chart will show them how the tutorials are ranked and the total number of voters. To achieve this, we will be using jQuery, jQuery UI, PHP, CSS & MySQL. You can use the code I provide here to make your own versions and mash-ups. Step 1 – XHTML To make a better understanding of these steps, it would be nice to have the download files nearby and open, so you can trace where the code I explain here originates from. We start with the XHTML markup. demo.php Worth noting is the sform form. Maybe more interesting here is the PHP part on lines 3-5. <li id="<? This code is positioned inside a while loop, that outputs it for each list item. A sortable LI element Now lets dig a little deeper into the CSS styles. Step 2 – CSS In the code below, you can see how we have styled the XHTML we generated earlier. Step 3 – PHP

jQuery for Designers - Tutorials and screencasts Making Our Own Twitter Timeline Martin Angelov Introduction Twitter has grown into a real social phenomenon. This is an incredible achievement for such a simple service. But as you know, great ideas are not necessarily complex. This time we are going to create our own twitter-like timeline, where you can view and post your tweets. Creating the DB If you’d like to run a working demo on your own site, you will have to create a MySQL table where all your tweets are going to be stored. table.sql CREATE TABLE `demo_twitter_timeline` ( `id` int(10) NOT NULL auto_increment, `tweet` varchar(140) collate utf8_unicode_ci NOT NULL default '', `dt` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; The table can be in any mysql database. The XHTML Thanks to CSS and jQuery, our XHTML code is quite simple. index.php Our entire timeline is positioned inside a div container with an id of twitter-container. Next we have the form with an id of tweetForm. The CSS

Niceforms :: Personal projects :: Emblematiq Web forms. Everybody knows web forms. Each day we have to fill in some information in a web form, be it a simple login to your webmail application, an online purchase, or signing up for a website. They are the basic, and pretty much the only way of gathering information on the web. You basically know a web form when you see one as they always look the same and they’ve kept this look over the years. Try as hard as you might but web forms can only change their appearance so much. Niceforms is a script that will replace the most commonly used form elements with custom designed ones. [RANGE] DatePicker - jQuery plugin About Date Picker component with a lot of options and easy to fit in your web application. Last update 22.05.2009 - Check Download tab Features Flat mode - as element in page Multiple calendars in the component Allows single, multiple or range selection Mark dates as special, weekends, special days Easy to customize the look by changing CSS Localiation for months' and days' names Custom day to start the week Fits into the viewport License Dual licensed under the MIT and GPL licenses. Examples Flat mode, single selection, the week start monday. Flat mode, multiple selection, disabled dates, special day, the week start sunday. Clear selection $('#date3').DatePickerClear(); Flat mode, range selection, 3 calendars. Attached to an text field and usign callbacks to update the date selection with the value from the field. Flat mode, inside a custom widget and with custom design. Download (55 kb): jQuery, Javscript files, CSS files, images, examples and instructions. Changelog The first release.

Free Shopping Cart -- No CGI acccess required! Setup a checkout page. If you have a secure server, and CGI access, the form action on this page should point at it. If you are accepting credit card numbers, a secure server really should be used. If you have CGI access, place the file into your cgi-bin directory, and point the FORM ACTION from this checkout page to it. If you don't have CGI, but you can access scripts, place the file checkout.php on your server, and point the FORM ACTION from the checkout page to it. Your checkout page is going to look something like: <! If you do not have your own CGI or PHP capability, then use your ISP's 'formmail' or 'mailto' scripts. If you are absolutely sure you have no mail script available, you can use the FORM line <FORM ACTION="" ENCTYPE="text/plain"> where the email address is your own. Do you use a payment processor/gateway?