This is going to be very nice Yehuda. Great work!

--
Brandon Aaron

On 1/11/07, Yehuda Katz <[EMAIL PROTECTED]> wrote:
> I've begun work on a Safari widget pack, that allows you to work with Safari
> widgets in a way more jQuery way.
>
> For example:
>
>       var y =
> $("#scrollArea").makeScrollAreaWithBars({singlepressScrollPixels:
> 50}, {id: "scrollBar"}, {id: "horizBar"})
>         .bind("mouseover", function() { y.focus(); }).bind("mouseout",
> function() { y.blur(); })
>       z = $("button").makeGlassButton();
>       z[0].click(function() { y.horizontalScrollbar ().toggleAutohide(); });
>       z[1].click(function() { y.verticalScrollbar().toggle(); })
>
> The above code does the following:
>
> Line 1: Converts a div with id scrollArea into an AppleScrollArea with
> horizontal and vertical scrollBars (with attributes provided)
> Line 2: binds a mouseover event to the newly created scrollArea widget and
> then a mouseout event
> Line 3: Converts all buttons on the page into glass buttons, and returns an
> array of the new glass buttons
> Line 4: Gets the first glassButton and binds a click handler which toggles
> the autohide on the scrollArea's horizontal scrollbar
> Line 5: Gets the second glassButon and binds a click handler which toggles
> the vertical scrollbar
>
> This would obviously be way more than 5 lines if you used the Apple API ;)
>
> The files are in the plugins in svn under safari_widgets. There's still a
> lot of work to do, but I wanted to get some feedback on the work I did. The
> best way to look at it is to open the HTML file that's packed with the svn.
> You'll need OSX 10.4.3 or higher.
>
> Thanks!
>
> --
> Yehuda Katz
> Web Developer | Wycats Designs
> (ph)  718.877.1325
> _______________________________________________
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>
>
>

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to