ok, next i want to be able to rollover the element, in this case, an
h1, and have the css definitions pop up in a tool tip box.  so i've
got my custom tool tip box calling an external file named
cssHovTip.asp.  in that file i have a div class called "css-code".
back in the original file i am doing this...

        var css_code_window = $("div.css-code").load("cssHovTip.asp");

        $.each(css_code_window, function() {


                 var color = $("a.api-example").css("color");
                 $(this).text(color);

        });

when i rollover the example window, the tooltip box pops up, but there
is no css style being shown.  can somebody show me where my error is,
and point me in the direction of debugging it because i've exhausted
all options i can think of with no success.

On Mar 13, 9:39 am, "sfea...@gmail.com" <sfea...@gmail.com> wrote:
> looks good.  thank you!
>
> On Mar 12, 2:58 pm, mkmanning <michaell...@gmail.com> wrote:
>
> > Sorry for the terse response, but you might want to check out
> > getComputedStyle/currentStyle
>
> > On Mar 12, 10:33 am, "sfea...@gmail.com" <sfea...@gmail.com> wrote:
>
> > > Thanks for the response.  I want to make it standard across the site
> > > so I can do a simple call to display whatever style(s) of that
> > > particular element (in this case an h1).  Is there any method I can
> > > call that willreturnthe entirecssdefinition for the element in
> > > question?  Maybereturnas a string and then I can print it on the
> > > screen?
>
> > > On Mar 12, 11:02 am, Leonardo K <leo...@gmail.com> wrote:
>
> > > > I don't know if I understand but u canreturnthecssusing thecssmethod
> > > > like:
>
> > > > $("h1").css("color"); //returnthe color
> > > > $("h1).css("background-color"); //returnthe backgrund-color
>
> > > > U have to call thecssmethod for every property incss.
>
> > > > On Thu, Mar 12, 2009 at 12:50, sfea...@gmail.com <sfea...@gmail.com> 
> > > > wrote:
>
> > > > > Sorry I don't want to sound like I'm asking for the solution, just a
> > > > > point in the right direction on where to start.  Thanks!
>
> > > > > On Mar 12, 10:28 am, "sfea...@gmail.com" <sfea...@gmail.com> wrote:
> > > > > > Hey there.  I'd like to start out by saying I'm new to jQuery, so 
> > > > > > if I
> > > > > > am not making sense, please let me know.  I'm creating a sort of 
> > > > > > style
> > > > > > guide to my website for viewers to look up the current styles used 
> > > > > > on
> > > > > > the site.  Kind of like the jQuery docs section actually.
>
> > > > > > I currently have it set up to display an example, and the HTML of 
> > > > > > the
> > > > > > example, using a simple little script that grabs the html out of the
> > > > > > specified div I'm using for the examples.  I would also like to add 
> > > > > > a
> > > > > >cssfunction that returns thecssfrom the stylesheet of that
> > > > > > particular object I'm displaying.  So if I wanted to display what 
> > > > > > the
> > > > > > H1 tags look like it would go something like this
>
> > > > > > H1 Tag
>
> > > > > >   HTML
>
> > > > > >     <h1>This is an H1 Tag</h1>
>
> > > > > >   Example
>
> > > > > >     This is an H1 Tag
>
> > > > > >  Css
>
> > > > > >     h1 {
> > > > > >       .....
> > > > > >     }
>
> > > > > > Of course it looks a lot prettier than that but you get the jist of
> > > > > > the idea.  How would I go about traversing theCSSand grabbing that
> > > > > > style associated with the current example, then returning that
> > > > > > style?

Reply via email to