There is a function called hasClass() that you can apply to the
results of a selector (http://docs.jquery.com/Attributes/hasClass). Do
you think this fits with what you're looking for?

For example, let's say you have HTML like so:
<div id="someDiv" class="test">test</div>

You could query whether this div has the class 'test' applied by
writing:
$('div#someDiv').hasClass('test')

- Gavin

On Mar 4, 8:38 pm, Code <[email protected]> wrote:
> Is there’s a CSSApplied event that I can listen to if my javascript
> code relies on CSS properties?
>
> For example:
> In an external css file I define a css class:
> .test
> {
>   width:100px;
>   height: 100px;
>
> }
>
> Then in html document I have an element <div class="test">test</div>.
> Later also in this document I try to get the dimension of the the div
> element.
> But if the css is not applied, I got a dimension other than
> 100X100px.
> Wonder is there any way to detect all css classes is applied?
>
> Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to