Dani-Br
Dani-Br

Reputation: 2457

Insert JS in CSS

I'm looking for a way insert JS into web page using CSS file, in Opera. In Internet Explorer [I tested it on 5.5,6,7,8] it's possible using behaviour property.

behavior: url(file.htc);

From my experience it's very useful. Now I need it for Opera.

Upvotes: 1

Views: 237

Answers (2)

Alex KeySmith
Alex KeySmith

Reputation: 17091

The behaviour property is a proprietary to internet explorer. So it's unlikely you will find an equivalent.

However interestingly, looking through an old W3 working draft, it is proposed as a standard - but I haven't seen anything about other browsers actually supporting it nor an equivalent.

On a side note: The behaviour property is very useful for "patching" internet explorer to enhance old browsers with newer features e.g. adding css3 rounded corner support etc. But at this time, because it is non-standard I would not recommend using it for anything other than adding support to outdated browsers.

Upvotes: 0

thirtydot
thirtydot

Reputation: 228152

There is no such equivalent feature in Opera.

You'll have to find another way to solve your problem.

Upvotes: 2

Related Questions