Change line in <script> tag only for IE

68 views Asked by At

I want to change a line inside a script tag only for IE.

The line is:

<script>
  $(document).ready(function() {  
    $("body").niceScroll({
      mousescrollstep: false,
    });
  });
</script>

So, I went with conditional comments like:

<!--[if lte IE 9>
    <script>
      $(document).ready(function() {  
        $("body").niceScroll({
          mousescrollstep: 32,
        });
      });
    </script>
<![endif]-->

...but it doesn't work.

0

There are 0 answers