Mike,

Looks good. One tip to reduce the code. You could re-write your multiple
css() calls that look like:

var wrapper = $("<div>")
        .css("width", settings.imagewidth + "px")
        .css("height", settings.imageheight + "px")
        .css("background", "url(" + settings.image + ") 0 0 no-repeat")
        .css("background-position", "right")
        .css("display", "inline")
        .css("position", "absolute")
        .css("overflow", "hidden")
        .css("cursor", "pointer");

var wrapper = $("<div>")
        .css({
                  "width": settings.imagewidth + "px"
                , "height": settings.imageheight + "px"
                , "background": "url(" + settings.image + ") 0 0 no-repeat"
                , "background-position": "right"
                , "display": "inline"
                , "position": "absolute"
                , "overflow": "hidden"
                , "cursor": "pointer"
        });

This will reduce the number of calls to the jQuery chain.

-Dan

>-----Original Message-----
>From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
>Behalf Of Mika Tuupola
>Sent: Tuesday, October 23, 2007 12:55 PM
>To: jquery-en@googlegroups.com
>Subject: [jQuery] New plugin: File Style
>
>
>Not being able to style file inputs is long time problem. File Style
>to the rescue!  It enables you to style file inputs and makes your AD
>happy.
>
>http://www.appelsiini.net/projects/filestyle
>http://www.appelsiini.net/projects/filestyle/demo.html
>
>I would appreciate all feedback. Especially from IE7 users. Does the
>file browser open when you click on different "Choose file" buttons?
>
>--
>Mika Tuupola
>http://www.appelsiini.net/
>
>


Reply via email to