infact could just parse it as an int when i read the cookie initially.

Any other additions needed?

To return to default you would call SetFontSize(0);

might just make a reset method to do..

Cheers

Stefan

On 4/12/07, Stefan Sedich <[EMAIL PROTECTED]> wrote:

Yeah the parseint was due to when its passed from a cookie. Thanks for the
comments, i was expecting someone to flame me for crap code hehehe.

Cheers

Stefan

p.s. How do i go about getting it added to plugins?

On 4/12/07, Joel Birch <[EMAIL PROTECTED]> wrote:
>
>
> On 12/04/2007, at 7:10 PM, codemonkey wrote:
> > Hi made a little plugin that handles resizing the font on a page.
> > Only thing
> > it relies on is that you have fonts set by em on your page. The plugin
> > requires jquery and the cookies plugin.Feedback would be appreciated.
>
> Hi Stefan,
>
> I love it. This is something I have thought about a few times and I
> would have done it very similar to how you have (had I of got around
> to doing it). The code is very easy to read and seems darn near
> perfect to my eye.
>
> Maybe it would be good to have a way of setting the size back to the
> default though. That way the developer could create the buttons for
> 'smaller, default, larger'. Like how in Firefox you can use 'Cmd +'
> and 'Cmd -' (Mac) to increase and decrease the size, and then 'Cmd 0'
> to return to default.
>
> Just wondering why you needed the 'parseInt' function at all. When I
> follow the code it never seems that a string is ever passed in that
> needs parsing. Is it because when the value is returned from a cookie
> it is a string that needs parsing?
>
> I often set the body font to a keyword so I would have to change my
> practices a bit to use this plugin I suppose, but that's no big deal.
> I know its possible to get good consistency with ems also.
>
> Thanks and great work. Definitely try and get around to adding this
> to the plugins page if you haven't already.
>
> Joel.
>


Reply via email to