OZONE Asylum
Forums
XML - XSL - XSLT - XHTML - CSS - DOM
Can I assign a script to a CSS class?
This page's ID:
21934
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
Well I figured this out by pure luck/coincidence. I was looking on a way to make a css hover that would work in IE, as IE only seems to accept hovers on links. It's possible to attach a script to a CSS class or ID through the use of .htc files They're used as follows: .class { behavior: url(file.htc); } and file.htc contains: <public:component> <public:attach event="OnMouseOver" onevent="ScriptName> <script language="javascript"> function ScriptName { //script goes here } </script> </public:component> This way, for example, you could add an OnClick function to a table cell or a div, or any html tag through the use of a class or ID. You could even add it directly through the html via style="behavior: url(file.htc);" This makes me happy
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »