Jonah,

Thanks for the tip, I will think about that for future enhancements.
There's currently another thread where someone says the .clone()
method is slow too. In either case, I'm not too worried about speed.
The plugin is really only intended for adding a few drop shadows to a
page, just to add a little glam without having to Photoshop.
Unfortunately, my demo page is quite loaded up with them, and that
does show how slow it can get.

Generally, if I have to decide between speed and readability, I will
go for readability. The plugin started out as an experiment/learning
exercise and, really, it's only a hack for what the browsers should be
doing natively. In order to get the soft edges, it creates at least
nine copies (multiply that for each step of blur) of each original
element and, in the case of IE, it has to apply the opacity filter to
each of them. Any way you slice it, that's going to put a burden on
the processing if you do it very much. It's just a cosmetic effect
anyway, and it should be used sparingly.

Larry


On Jan 3, 5:40�am, weepy <[EMAIL PROTECTED]> wrote:
> The only issue I have so far is with the speed - it can be quite slow.
>
> You could significantly speed up your HTML creation by simply creating
> the HTML by concatenating strings.
> Jquery's functions are generally quite slow.
>
> e.g.
>
> instead of
>
> divShadow.append(shadows[i]);
>
> use
>
> divShadow[0].innerHTML += shadows[i] (where shadows is the string form
> of the html)
>
> On Jan 3, 9:49 am, slooodge <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi Larry,
>
> > first of all, thanks for sharing your beautiful dropshadow plugin!
> > I would like to use it on one of my website to create a shadow around
> > images. But unfortunately I can't get it running.
> > I am german and my english is not very good, so maybe I just
> > misunderstood the documentation.
> > I simply downloaded dimensions.js and dropshadow.js and created the
> > following try-out page - but no shadow...
>
> > I would be very grateful if could tell me what I did wrong!
>
> > THANKS, Hannes
>
> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> > <html xmlns="http://www.w3.org/1999/xhtml";>
> > <head>
> > <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
> > <title>Unbenanntes Dokument</title>
> > <script type="text/javascript" src="js/jquery.js"></script>
> > <script type="text/javascript" src="js/dimensions.js"></script>
> > <script type="text/javascript" src="js/dropshadow.js"></script>
>
> > <script type="text/javascript">
> > $(document).ready(function() {
> > � � � � � � � � � � � � $("h1 span").dropShadow();
>
> > });
>
> > </script>
>
> > <body>
> > <h1><span>Your</span> <span>Page</span> <span>Title</span></h1>
> > <body>
> > </body>
> > </html>- Hide quoted text -
>
> - Show quoted text -

Reply via email to