user134399
user134399

Reputation: 33

Advanced Jquery Form Errors (IE7)

I recently created a advanced form with elements that use jquery's $().hide & $().show functions. It's working great in safari and ff, but for some reason in ie7, the $().hide action in jquery is not working properly. Any suggestions?

http://www.tasteofinkstudios.com/webdesign.html

Upvotes: 3

Views: 173

Answers (2)

PatrikAkerstrand
PatrikAkerstrand

Reputation: 45721

Building on Chaos answer, one thing I've learned to do as the first step, always, when something seems off in JavaScript, is to ensure that there are no syntax errors. For this purpose I use JSLint, which is an awesome and indispensable tool when writing JavaScript. It will help you save loads of debugging time.

Upvotes: 1

chaos
chaos

Reputation: 124307

Your jQuery specifications are breaking in IE because IE does not allow trailing commas in object/array literals (for which I loathe it more than I can possibly express, as if there needed to be more reasons). This:

    $('a.whats-this-main, a.package-details').tooltip({

        fade: 250,
        top: -400, 

    });

needs to be this:

    $('a.whats-this-main, a.package-details').tooltip({

        fade: 250,
        top: -400

    });

If you're going to be debugging JS in IE, you need to turn off Tools -> Internet Options : Advanced : Disable script debugging (Internet Explorer).

Upvotes: 3

Related Questions