Posted By

stavelin on 02/24/08


Tagged

css javascript Opera


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

SpinZ


Only Opera


 / Published in: JavaScript
 

Target only opera with external CSS

  1. <script type="text/javascript"><!--
  2. var start = "<"
  3. var end = ">"
  4. if (navigator.userAgent.indexOf('Opera') != -1) {
  5. document.write(start)
  6. document.write('link rel=\"stylesheet\" type=\"text/css\" href=\"/css/opera.css\" ')
  7. document.write(end)
  8. }
  9. //--></script>

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: stavelin on September 11, 2008

I know this is a but funny formulated, as the start & end is defined as variables, but of some odd reason this works, while writing the full line does not.

You need to login to post a comment.