Fix for IE7, jQuery magic doesn't help here, it needs to be valid html, shorthand...
authorKrinkle <krinkle@users.mediawiki.org>
Sun, 6 Mar 2011 23:25:33 +0000 (23:25 +0000)
committerKrinkle <krinkle@users.mediawiki.org>
Sun, 6 Mar 2011 23:25:33 +0000 (23:25 +0000)
resources/mediawiki.util/mediawiki.util.js

index 26e4724..17d3eb2 100644 (file)
                                return null;
                        }
                        // Setup the anchor tag
-                       var $link = $( '<a />' ).attr( 'href', href ).text( text );
+                       var $link = $( '<a></a>' ).attr( 'href', href ).text( text );
                        if ( tooltip ) {
                                $link.attr( 'title', tooltip );
                        }
                                if ( $ul.length === 0 ) {
                                        // If there's no <div> inside, append it to the portlet directly
                                        if ( $portlet.find( 'div:first' ).length === 0 ) {
-                                               $portlet.append( '<ul/>' );
+                                               $portlet.append( '<ul></ul>' );
                                        } else {
                                                // otherwise if there's a div (such as div.body or div.pBody)
                                                // append the <ul> to last (most likely only) div
-                                               $portlet.find( 'div' ).eq( -1 ).append( '<ul/>' );
+                                               $portlet.find( 'div' ).eq( -1 ).append( '<ul></ul>' );
                                        }
                                        // Select the created element
                                        $ul = $portlet.find( 'ul' ).eq( 0 );
 
                                // Wrap the anchor tag in a <span> and create a list item for it
                                // and back up the selector to the list item
-                               var $item = $link.wrap( '<li><span /></li>' ).parent().parent();
+                               var $item = $link.wrap( '<li><span></span></li>' ).parent().parent();
 
                                // Implement the properties passed to the function
                                if ( id ) {