How Does jQuery Assign Classes to Tags?
For example, in the sample accordion in index.html created with Themeroller, the following statement exists in the header:
- // Accordion
$("#accordion").accordion({ header: "h3" });
Later in the file, for each accordion menu option, we have:
- <div id="accordion">
<div>
<h3><a href="#">Accordion</a></h3>
<div style="font-size: 1.1em; height:auto;">Blah blah blah...</div>
</div>
Note the lack of class names. Then, when viewed from Firebug, h3 has been assigned the following classes:
- ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom
These classes are from the jquery-ui-1.8.10.custom.css file, but how are they assigned? Where are these classes assigned to this h3 tag? Of course, I'm looking to create other classes and further customise these elements.
In the jquery-ui-1.8.10.custom.js file, I see the code that drives the accordion, but can't find where the class assignments to h3 are made.
I'm sure that the answer is right in front of my nose, but I can't put my finger on it.
Thanks for your help.
.