Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within HTML Pages with CSS and JavaScript
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
HTML Pages with CSS and JavaScript
Using css classes in external javascript file?
Justin Fox
Ranch Hand
Posts: 802
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
How would I use an external .css class in my external .js file?
Thanks,
Justin Fox
You down with OOP? Yeah you know me!
Bear Bibeault
Sheriff
Posts: 67746
173
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Once a JavaScript file is loaded, there is no difference between whether the script was on-page or in an external file. So your script can reference any CSS class just as if it were defined on-page.
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
JSF - Problems with NetBeans 6.9.1
layout and multibrowser hell
Activex xmldom nightmare
JSF: tomahawk dataTable rowStyleClass problem while applying alternate colors to rows
Taglib to attach CSS-File?
More...