WordPress.org

Ready to get started?Download WordPress

Forums

WP Resume
[resolved] JavaScript trailing comma (3 posts)

  1. Azizur Rahman
    Member
    Posted 3 years ago #

    JavaScript trailing comma

    Internet Explorer does not support trailing commas:

    $("#sections, .positions, .organizations").sortable({
        	axis:'y',
        	containment: 'parent',
        	opacity: .5,
        	update: function(){},
    		placeholder: 'placeholder',
    		forcePlaceholderSize: 'true',   // This is a trailing comma and will break on IE
        });

    Here are some blog entries referencing this problem. If anybody has more official references for this (or know about exact versions affected; This is a problem in all versions of IE up to version 7. IE 8 does allow trailing commas in arrays and object definitions, however only when in IE 8 strict mode I believe.

    * http://www.rockstarapps.com/wordpress/?p=29
    * http://brajesh.wordpress.com/2008/03/18/internet-explorers-trailing-comma-woes/
    * http://blog.chrismasto.com/articles/2008/02/12/ie7-suckage
    * http://www.nczonline.net/blog/2010/02/02/how-internet-explorer-8-document-mode-affects-javascript/

  2. Ben Balter
    Member
    Plugin Author

    Posted 3 years ago #

    Thanks for the heads up.
    Made the change and just finalizing testing before I push the fix into the repo.

  3. Ben Balter
    Member
    Plugin Author

    Posted 3 years ago #

    Should be fixed in the development version. Thanks again for all your help.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags