Out of curiosity... what are you expecting back from the call to padding when it is different for top/bottom vs left/right? If it returns a string then you'll have to do your own parsing. If it returns an object, then you'll have to access each property separately. Also should the return value be exactly what is in the stylesheet? In this case should it return a string with two values (top/bottom and left/right)? Why not just request the padding for the side that you need? Currently jQuery doesn't support the retrieval of CSS shorthand properties. You'll need to get the padding for each side separately. $("div").css("padding-top");
-- Brandon Aaron On Wed, May 6, 2009 at 8:13 PM, Stephen McKamey <step...@jsonfx.net> wrote: > > We've run into an issue where, when a style ("padding" in this case) > with multiple parts ("5px 3px" in this case) is being set by a > stylesheet (rather than inline) is accessed in IE6/7/8, jQuery 1.3.2 > causes the exception "Error: Invalid argument." The exception is > thrown in the middle of "the awesome hack by Dean Edwards" on line > 835. > > Has anyone else experienced this, and is there a known workaround? > > Here is a simple example which demonstrates it (in Internet Explorer): > > <html> > <head> > <style type="text/css">#foo { padding: 5px 10px; }</style> > > <script type="text/javascript" src=" > http://ajax.googleapis.com/ajax/ > libs/jquery/1.3.2/jquery.js"></script> > <script type="text/javascript"> > $(function() { > alert($("#foo").css("padding")); > }); > </script> > </head> > <body> > <textarea id="foo"></textarea> > </body> > </html> > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---