Aug 17
Steffen Rusitschka wanted a cross-browser text-overflow:ellipsis, so he created it and told us all about it via Ellipsis or “truncate with dots” via JavaScript.
You can see it in action, or download the code. The main ellipsis function:
JAVASCRIPT:
-
function ellipsis(e) {
-
var w = e.getWidth() - 10000;
-
var t = e.innerHTML;
-
e.innerHTML = "" + t + "";
-
e = e.down();
-
while (t.length> 0 && e.getWidth()>= w) {
-
t = t.substr(0, t.length - 1);
-
e.innerHTML = t + "…";
-
}
-
}
Aug 17
Olav Bjorkoy recently launched Blueprint CSS, a framework that takes typography into account.
Why did Olav create it?
After reading an article by Jeff Croft on frameworks for designers, I started looking at the existing CSS frameworks, trying to find one that was right for me.
Never again was I to repeat the tedious task of creating a grid from scratch, defining default typography, or battling with inconsistent default browser CSS.
Read the rest of this entry »
Aug 17
In July, Brad Neuberg and a group of talented hackers released Purple Include, a library that does transclusions.
Now there is a new version which is a major refactoring that simplifies working with the library and now works across all major browsers.
Brad tells us more:
Purple Include is a client-side JavaScript library that allows you to do client-side transclusions.
What the heck does that mean?
It means that you can include and display fragments of one HTML page in another without copying and pasting any content. For example, you could quote the second paragraph from another person's blog entry by embedding something like:
[via Ajaxian]
Aug 17
This is big. Prototype 1.6 is a major upgrade, and the first RC has been released. There is a large number of updates and my pet favourites are:
- The event system has been cleaned up. It now works the way you would expect, with "this" doing the right thing
- You can observe and fire custom events on the DOM (a la Dojo)
- Thanks to the custom events, DOMContentLoaded is normalized across browsers via: document.observe("contentloaded", function() { … })
- AOP-lite: Simple interception and function currying
- Function delay and defer: (function() { $("form").fire("requestSent") }).defer();
- Ajax.Response: Now you can more easily work with JSON
- DOM Builder
- Template API: "#{last}, #{first}".interpolate({ first: "Andrew", last: "Dupont" })
- Improved support for JavaScript 1.6 and WHATWG 1.0 standards
Be sure to take a detailed look at this puppy.
[via Ajaxian]
Recent Comments