You need to wrap your javascript in a ready event, like this: <script type="text/javascript"> $(document).ready(function() { var objs = $('#divHello') objs.corner(); }); </script>
It may also be a good idea to put this in the <head> if you can. Check out this for more information on using jQuery: http://docs.jquery.com/Tutorials:Getting_Started_with_jQuery On Jul 20, 1:39 am, Muzzzy <[EMAIL PROTECTED]> wrote: > Hi, > > I'm pretty new to jQuery package and as a training opportunity I 'm > converting my asp.net ajax site to use jQuery instead. Now, I need to > use round corners functionlity and I downloaded the jquery.corner.js > plugin, but when I try to use it, it doesn't seem to work right. > Consider this simple html file: > -------------------------------------------------------------------------------------------------- > <html> > <head></head> > <body> > <script type="text/javascript" src="jquery.js"></script> > <script type="text/javascript" src="jquery.corner.js"></script> > > <div style="background-color:navy;width:400px; border: solid 1px > yellow" id="divHello"> > <p>Hello World!</p> > </div> > > <script type="text/javascript"> > var objs = $('#divHello') > objs.corner(); > </script> > > </body> > </html> > ---------------------------------------------------------------------------------------------- > > Now, if you run it in IE 7.0, then "Hello World!" shows aligned to > the top and part of "H" is damaged by the added divs. If you run in in > FF 2.0, then this phrase appears to the bottom and again, part of "H" > is corrupt. If I use IE developer toolbar or FireBug to explore the > DOM, I see that added div's have some weird margins. > > Any ideas what I might be doing wrong in this example? > > Thank you, > Andrey