background preloader

In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery

In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery

Extending Twitter Bootstrap Typeahead Plugin | redlab-log Update: also read this post In twitter bootstrap there is a JQuery plugin for auto completion. It’s called bootstrap-typeahaed. Typeahead uses an array of strings as datasource and is easily activated with in it’s simplest form 1 line of code. It’s very easy to use but somewhat limited. Our use case: 2 inputboxes, one for postal code (the numeric form) and one inputbox for the community that has that postal code.In Belgium different communities can have the same postal code, and the right community should be selected on selecting a postal code. The typeahead plugin is not suited for that. We wanted to use typeahead instead of any other existing JQuery plugin since we’re already using twitter bootstrap. To achieve this I extended, (actually more copied and altered) typeahead. View a demo Read on for a usage example Considering the example of the cities and postalcodes the javascript would be like for the postalcode inputbox and for the citynames inputbox. Like this: Like Loading...

www.jarallax.com/demo3/ Jump to progress the Jarallax.jumpToProgress method allows the user to animate the Jarallax animation to a position in the animation. This is a very handy method for navigation. To see it in action press one of the navigation buttons on top of the page. Example jarallax.jumpToProgress( 20, 2000, 30); In this example Jarallax animates to position 20 over 2000 milliseconds with 24 frames a second. Smooth scrollbar Some browsers smooth out the scrollbar when it is moved (like safari). Enabling the smoothed scrollbar will animate the current progress of the Jarallax animation to the scrollbar position. Example: var jarallax = new Jarallax(new ControllerScroll(true)); Clone animations In earlier versions of Jarallax every animation needs to be defined. When defining an animation with the addAnimation method, an animation sequence is returned. The first argument expects a selector, the second an object or array with the key modifications.

Creating MS Word documents on the fly Articles Application Architecture by: Khairul Amri Yunus December 2, 2003 Introduction Printing HTML pages directly from browsers usually does not give the best printing output, compared to output from word processors such as Microsoft Word. This article provides a guideline on how to generate documents and letters in MS Word format using a pre-defined template. This solution can be accomplished using COM extension. Overview Lets start with the big picture. First, we need to prepare a MS Word document (*.doc) that contains the sample output. Preparing the MS Word Template This step is actually simple, all we need is a MS Word document (*.doc) that contains the sample output and Bookmarks. To create a Bookmark in a MS Word document, click on Insert/Bookmark. A Bookmark name can only contain letters, numbers and underscores. The code we use in the next section just substitutes a specified bookmark with text, therefore the formatting, images, tables and etc will not be lost.

JavaScript and jQuery PDF Viewer Plugins Today’s post is about some JavaScript and jQuery PDF related plugins we found on the Internet that allows you to embed and view PDF files. Enjoy! Related Posts: pdf.js PDF Reader in JavaScript. SourceDemo PDFObject Embeds PDF files into HTML documents. SourceDemo jsPDF It is an open-source library written by our lead developer, James, for generating PDF documents using nothing but JavaScript. Source + Demo ThickBox A webpage UI dialog widget written in JavaScript on top of the jQuery library. Source + Demo AnyChartStock JavaScript API The chart can be exported as a static image in the PNG or JPG format or as a PDF document with an embedded static image of the chart or a fully interactive functional chart, as user sees it on the page. SourceDemo Google Docs Viewer plugin for jQuery (gDocsViewer jQuery plugin) Automatically embeds the Google Docs Viewer for viewing pdf, doc, docx, ppt and tiff files linked to by anchor tags. SourceDemo zohoViewer jQuery plugin SourceDemo AUTHOR: Sam Deering.

jquery-complexify Websites have a responsibility to users to accurately tell them how good a password is, and this is not an easy job. If your password is 8 characters long and only formed of lower case characters, you need to make it better, perhaps by adding a number or more characters. If your password is 25 characters long but happens to not contain a number, you shouldn't be forced by a password security policy to add one, you clearly have a very secure password. Complexify aims to provide a good measure of password complexity for websites to use both for giving hints to users in the form of strength bars, and for casually enforcing a minimum complexity for security reasons. Note: I use the term 'casually' because this is only client-side validation and anyone could turn it off. I recommend implementing a minimum length check server-side as well. Complexity Rating Unicode Complexify supports Unicode and will add appropriate complexity for the size of character set included in a password. Try it out:

Les Media Queries CSS3 La spécification CSS3 Media Queries définit les techniques pour l'application de feuilles de styles en fonction des périphériques de consultation utilisés pour du HTML. On nomme également cette pratique Responsive Web Design, pour dénoter qu'il s'agit d'adapter dynamiquement le design à l'aide de CSS. Ces bonnes pratiques permettent d'exploiter encore plus les avantages de la séparation du contenu et de la présentation : l'intérêt est de pouvoir satisfaire des contraintes de dimensions, de résolutions et d'autres critères variés pour améliorer l'apparence graphique et la lisibilité (voire l'utilisabilité) d'un site web. Les plateformes exotiques sont concernées en premier lieu : navigateurs mobiles et tablettes, écrans à faibles résolutions, impression, tv, synthèses vocales, plages braille, etc. Approche historique Avec CSS2 et HTML4, il était déjà possible de spécifier un média de destination pour l'application d'une ou plusieurs feuilles de style. <! screen Écrans handheld print Impression

validate.js Lightweight JavaScript form validation library inspired by CodeIgniter. No dependencies, just over 2kb gzipped, and customizable! validate.js (development - 16kb) validate.min.js (minified - 2.1kb) Example All of the fields were successfully validated! Features Validate form fields from over a dozen rules No dependencies Customizable messages Supply your own validation callbacks for custom rules Chainable customization methods for ease of declaration Conditionally validate certain form fields Works in all major browsers (even IE6!) Installation and Usage Include the JavaScript file in your source Create the validation object with your desired rules. FormValidator new FormValidator(formName, fields, callback) The FormValidator object is attached to the window upon loading validate.js. The formName passed in to validate must be the exact value of the name attribute of the form An array of fields will be used to perform validation on submission of the form. Custom Validation Rules #1. setMessage

Prism Layout Gala: a collection of 40 CSS layouts based on the same markup and ready for download! All layouts use valid markup and CSS, and have been tested successfully on Internet Explorer/win 5.0, 5.5, 6 and beta 2 preview of version 7; Opera 8.5, Firefox 1.5 and Safari 2. Each of the columns could be the longest, and for testing columns length I've used the script filler text on demand. Each layout could represent a site with five main sections: header, content, navigation, other stuff and footer. The basic markup, common to every layout, is the following: <div id="container"> <div id="header">Header</div> <div id="wrapper"> <div id="content">Content</div> </div> <div id="navigation">Navigation</div> <div id="extra">Extra stuff</div> <div id="footer">Footer</div> </div> It's almost minimal, apart from an extra wrapper around the content. Talking about CSS: each of the layouts uses float and in most of the cases negative margins.

Bootleg.css Twitter Bootstrap Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater.

CSS3 Responsive Slider / Carousel Using Radio Buttons Select catcher Created by Ian Hansson (@teapoted) Art from Brendan Zabarauskas (@bjzaba_). Icons from the iconSweets set. Browser Support: Best In Test: Firefox (transition performance) Full Support: Chrome, Firefox, Opera, Safari (latest versions of all browsers) Partial Support: IE9 (Functional, but does not support transitions) *No JavaScript Functionality (1 compatability fix though) iOS devices don't handle labels properly. You can view this page without the js iOS fix here. How Does It Work? The actual slider is much like any JavaScript slider. To save our input we are using radio buttons. We put the radio buttons at the top so when they are :checked we can use a general sibling selectors (~) to change our slider. That is all the essential CSS, the other gaff is just styling and animation. Created by Ian Hansson (@teapoted), Feb 2012.

Modèle MCV Tout d'abord, vous devez vous demander ce que signifie cet acronyme énigmatique MVC. MVC sont les initiales de Modèle Vue Contrôleur. Comme vous pouvez vous en douter, l'organisation se fera en trois parties. Au lieu d'un fichier utilisé par une organisation de la programmation classique (tout dans un fichier), le modèle MVC divisera le tout en trois fichiers. Mais cela va beaucoup alourdir mon FTP ! À cette question, je répondrai qu'il faut savoir ce que l'on veut. Le gain réside dans le fait que votre code sera plus lisible qu'avec un seul fichier. Le contrôleur Nous allons commencer par le contrôleur, et vous allez comprendre pourquoi. Comme vous le voyez, c'est la partie du système qui fait le lien avec les deux autres parties. Le modèle Ce fichier ne contiendra que des fonctions. Vous aurez au final sans doute des fonctions du type : ajouter_news, supprimer_news, ajouter_commentaire_news pour un script de news. La vue La vue contient le code xHTML.

30 Amazing Resources for Sass Lovers Despite the predictions of countless skeptics, Sass hasn’t proved to be a fad at all, but rather a remarkably robust set of tools that genuinely improve CSS authoring. I’m a huge Sass fan and I know many of you are too, so I’ve compiled this list of thirty amazing resources for Sass lovers. In it you’ll find all kinds of goodies built on and for Sass: frameworks, plugins, apps and a lot more. Frameworks and Grid Systems Compass Compass is the quintessential companion to Sass. Bourbon Sass Mixins Library If Compass seems like overkill for you, but you still like the idea of leveraging some awesome CSS3 mixins, check out Bourbon. Bourbon Neat Bourbon Neat is a grid system built with Sass and Bourbon. Foundation Foundation is the main competitor to Twitter Bootstrap. Bootstrap Sass If you’re dead set on using both Bootstrap and Sass, check out this project, which essentially rewrites the LESS Bootstrap components in Sass. Animate.sass Forge Skeleton-SASS Susy: Responsive grids for Compass Frameless

Related: