I love developing usable and rich web applications using the latest techniques available.
Check out my projects or portfolio to see what keeps me busy.

Fixed (sticky) toolbars with jQuery

Here’s a little snippet of code that let’s you create sticky toolbars like they use in Magento for example :)

Include this in your js somewhere and then just call $(‘.toolbar’).fixed();

$.fn.fixed = function() {
    return this.each(function() {
        var header = $(this);
        var offset = header.offset();
        var floater = $('<div></div>').append(header.clone(true));
        floater.hide().appendTo(document.body).addClass('floating-toolbar');

        $(window).scroll(function() {
            var s = $(this).scrollTop();

            if (s > offset.top) {
                header.css('visibility', 'hidden');
                floater.show();
            } else {
                floater.hide();
                header.css('visibility', 'visible');
            }
        });
    });
};

And here’s some css to make it work.

.floating-toolbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0.85;
}
19/01/2010 at 5:16 pm — Comments (0)

Book review: CakePHP Application Development

Just like many other CakePHP bloggers out there, I also received a copy of Cakephp Application Development written by Ahsanul Bari and Anupom Syam, published by PACKT publishing.

The first thing I noticed were the cake’s printed on the cover, they don’t look really tasty to me because of the odd colors. Thankfully the inside of the book looked much better.

Read the full article

11/03/2009 at 6:02 pm — Comments (2)

Older posts Subscribe to RSS

GIT: ignoring changes in tracked files

29/01/2009

SoapSource, a SOAP Client Datasource for CakePHP

18/12/2008

Installing PHP5 soap extension on Leopard 10.5.5

17/12/2008

Cakephp router and prefixes

04/12/2008

MenuHelper renamed to NavigationHelper

27/11/2008

MenuHelper for CakePHP

04/11/2008