Articles Tagged with javascript
You are currently browsing 3 articles tagged with javascript.
How to Build an aFramework Module
Published Friday 16th of April 2010
As a follow up to "How aFramework Works" I thought I'd explain how to build your own modules for aFramework.
It's actually very simple. Of course you'll need to know the languages you'll be writing but I assume you do. The simplest modules consist of nothing but HTML.
Be the first to post a comment
Accessible, Stylish Modal Windows With Modern CSS
Published Wednesday 12th of August 2009
With this tutorial I will try to show you a way to do accessible, stylish modal windows (complete with an overlay-div) without using a single image and just a couple of div-elements.
Our goal is to create a generic modal that can be re-used and that has these basic features:
Modals should be hidden by default, except if the user has JavaScript disabled
The modal should be centered in the view port, even as the user scrolls
The modal should have those semi-transparent, rounded corners I've been seeing a lot of lately :)
There should (obviously) be an overlay behind the modal, preventing the user from interacting with anything behind it
Clicking outside the modal (i.e. on the overlay) should hide the overlay as well as all open modals (could be optional)
Clicking a link pointing to a modal (a[href=#login] for example) should open the modal and display the overlay
Don't use any images and keep it accessible!
You can check out the example here. We'll kick off simple with the HTML.
Join 7 others and post a comment
Super Simple Ajax (Without a Framework)
Published Friday 12th of June 2009
If you're looking for the bare minimum when it comes to doing cross-browser GET or POST XHR then this might be the script for you.
I know there's hundreds (probably thousands) of these scripts out there already but even the most lightweight ones I could find seemed kind of bloated.
Example
// GET latest-comments.php and update the #latest-comments element
superSimpleAjax({url: 'latest-comments.php'}, 'latest-comments');
// GET article with ID 12 and alert its contents
superSimpleAjax({
url: 'get-article.php',
data: 'id=12',
callback: function (data) {
alert(data);
}
});
// POST a comment to post-comment.php
superSimpleAjax({
method: 'POST',
url: 'post-comment.php',
data: 'author=John Doe&email=johndoe@johndoe.com&content=Hi, my name is John Doe',
callback: function (data) {
alert('Thanks for your comment!');
}
});Grab the code from Google Code. It's about 1k uncompressed.
Enjoy!
Be the first to post a comment
Random jQuery Plug-ins
Code Block Toolbar
If you post code-examples on your site you can use this plug-in to add some nifty buttons below each code-example that allows the user to, for example...
Drag to Select
Use this plug-in to allow your users to select certain elements by dragging a "select box". Works very similar to how you can drag-n-select files and ...
Pixastic Editor
This app/plug-in inserts a (completely stylable) toolbar next to any image in your document that allows the user to apply different Pixastic-effects ...
