Tuesday, May 11, 2010

Fun with cross browser compatability!

This code was acting wonky and it took me about 30 minutes to deduce why:


   
<script type="text/jscript" src="/Scripts/jquery-1.4.2.min.js"></script>
    <script type="text/jscript">

        $(document).ready(function() {

            $("#IPSearch").slideUp();

            $("#toggleIP").toggle(function() {
                $("#IPSearch").slideDown();
            }, function() {
                $("#IPSearch").slideUp();
            });
        });
    </script> 





If you took one look at the code above and said "Hey David, you should never use jscript, it's an IE specific type that Firefox will silently ignore" I really could have used your help a while ago.  A cookie for you anyway. :D

*Edit* fun, so even if I'm in compose mode instead of Edit HTML you still decide to interpret the HTML?

No comments:

Post a Comment