| Adding Classes with jQuery | |
|---|---|
| Tweet Topic Started: Monday, 11. April 2011, 01:03 (497 Views) | |
| Cory | Monday, 11. April 2011, 01:03 Post #1 |
![]()
Level 5
|
Classes to ElementThe first snippet, for example, will add a class to the Board Statistics table cell that contains "Total Forum Posts". The second snippet adds a class to the code blockquotes so they can be styled differently than blockquotes. The green text is the selector you are designating; you'll want to try and make it as specific as possible. The orange text is the text contained within the element. The blue text is the name of the custom class you wish to add. The :contains() selector is one selector I often use when adding classes, but you can use whatever is necessary to successfully add the class. Browser Classes The script above will add classes to the following web browsers for browser-specific CSS issues.
Edit the green text accordingly, to the resolution width you wish to designate. InvisionFree is known to not have many class and ID specifications as ZetaBoards does. However, there's ways to add classes with JavaScript and create complex selectors to style elements that do not have a ID or class attached to it. The first script allows you to use jQuery on your InvisionFree board which allows you to easily add classes to elements. Admin CP Skinning & Styles Board Wrappers Javascript
Admin CP Skinning & Styles Board Wrappers FooterThe above code is an example that allows you to add a class to style the forum rules that appears in forums and topics you have it enabled in. The following CSS is what may be used to style the forum rules. Admin CP Skinning & Styles Manage Style SheetsYou can change and add additional properties as you see fit. You can also create complex selectors that are based on surrounding elements, like so. That, for example will style the titlemedium on subforums only. |
Codes · Themes & Skins · Documentations Code Search
| |
Off
Profile |
Quote Top
|
| Joe | Monday, 11. April 2011, 19:22 Post #2 |
![]()
Hi.
|
Very nice doc Cory, thanks man.
|
| Joe | |
Off
Profile |
Quote Top
|
| tokyodrift | Wednesday, 27. April 2011, 11:24 Post #3 |
|
Level 9
|
Outline Documentations T H E M E S Documentation accepted in to the Themes database |
Off
Profile |
Quote Top
|
| Aidan | Monday, 9. May 2011, 16:25 Post #4 |
![]()
Level 12
|
Sweet document.
|
Off
Profile |
Quote Top
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Coding & Development · Next Topic » |
| Track Topic · E-mail Topic |
8:15 PM Jul 10
|
Powered by ZetaBoards Premium · Privacy Policy



Multi
Multi
Skinning & Styles



8:15 PM Jul 10


Outline Live