aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Using css classes in external javascript file? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Using css classes in external javascript file?" Watch "Using css classes in external javascript file?" New topic
Author

Using css classes in external javascript file?

Justin Fox
Ranch Hand

Joined: Jan 24, 2006
Posts: 802
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
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61199
    
  66

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] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using css classes in external javascript file?