jQuery working in everything but IE7. (checked my commas)

Posted by deadlyhifi on Stack Overflow See other posts from Stack Overflow or by deadlyhifi
Published on 2010-05-03T13:25:45Z Indexed on 2010/05/03 13:28 UTC
Read the original article Hit count: 337

Filed under:
|
|

The following code works in IE8, FF, Safari, Chrome etc. (not bothering with IE6 for this one), but doesn't work in IE7. I've been through the code with a fine tooth-comb. Checked the commas, messed around with ; but it's not going anywhere. I'm using the jQuery Validate and Uploadify scripts.

Can anyone see the problem here? Thanks.

    <script type="text/javascript">
        jQuery(document).ready(function($) {

            $("#validateform").validate({
                errorClass: 'invalid',
                rules: {
                    bike_url: {
                        required: true,
                        url: true
                    }
                }   
            })

            $("#uploadify").uploadify({
                'uploader'  : '<?php echo $url . '/wp-content/plugins/biketest/includes/uploadify/uploadify.swf'; ?>',
                'script'    : '<?php echo $url . '/wp-content/plugins/biketest/class/class.uploadify.php'; ?>',
                'folder'    : '<?php echo $url . '/wp-content/plugins/biketest/uploads'; ?>',
                'cancelImg' : '<?php echo $url . '/wp-content/plugins/biketest/includes/uploadify/cancel.png'; ?>',
                'auto'      : true,
                'fileDesc'  : '.jpg or .png files only please.',
                'fileExt'   : '*.jpg;*.jpeg;*.png;',
                'sizeLimit' : '2097152',
                'buttonText': 'Choose Image',
                'scriptData': { 
                    'random': '<?php $rand = rand(0, 999999); echo $rand ?>'
                },
                'onComplete': function(event, queueID, fileObj, response, data) {
                    var image = '<?php echo $rand; ?>-' + ((fileObj.name).toLowerCase()).replace(' ', '');

                    setTimeout(function(){ $(".uploaded").attr('src', '<?php echo $url; ?>/wp-content/plugins/biketest/uploads/s-' + image); }, 500);
                    $("[name=bike_img]").val(image);
                }
            })
        });
    </script>

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about uploadify