You can access all the the CSS rules with the "styleSheets" &
"cssRules" DOM objects.

Check these pages for good examples:
http://developer.mozilla.org/en/docs/Gecko_DOM_Reference:Examples#Example_4:_Using_Stylesheets
http://www.javascriptkit.com/dhtmltutors/externalcss2.shtml
http://cross-browser.com/x/lib/view.php?sym=xTraverseStyleSheet
http://cross-browser.com/x/lib/view.php?sym=xTraverseDocumentStyleSheets

I'm not 100% sure if IE supports these methods though.



On Apr 12, 4:33 pm, David <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> Is there way to check to see if a style class is declared within a
> document or css file related to the document? I'm building a plugin for
> our designer's internal use, with the goal of replacing the standard
> javascript dialogs with dialog boxes created with jqModal. I want to
> provide the designers with the flexibility to be able to style the
> dialog boxes to suit a site style but have a default style for the
> dialog if none is supplied.
>
> e.g.:
>
> if ( styles for #customConfirmDialog not declared in document/css ) {
>     $("#customConfirmDialog").css({ ... });}
>
> $("#customConfirmDialog").show();
>
> I'm sure I've seen this question asked on the list before but I can't
> find it and can't think of a way to search for it that won't return a
> thousand results.
>
> Regards,
>
> David

Reply via email to